Skip to content

Commit 2da6a36

Browse files
authored
Merge pull request swiftlang#3015 from DougGregor/nonisolated-conformance
Allow parsing of "nonisolated" as a type specifier along with "isolated"
2 parents 9787cd2 + 871be87 commit 2da6a36

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift

+1
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ public let TYPE_NODES: [Node] = [
648648
.keyword(.__shared),
649649
.keyword(.__owned),
650650
.keyword(.isolated),
651+
.keyword(.nonisolated),
651652
.keyword(._const),
652653
.keyword(.borrowing),
653654
.keyword(.consuming),

Sources/SwiftParser/generated/Parser+TokenSpecSet.swift

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesQRS.swift

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/SwiftParserTest/DeclarationTests.swift

+15
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,21 @@ final class DeclarationTests: ParserTestCase {
765765
)
766766
}
767767

768+
func testParseIsolatedConformances() {
769+
assertParse(
770+
"""
771+
extension Int: nonisolated Q {}
772+
"""
773+
)
774+
775+
assertParse(
776+
"""
777+
extension Int: @MainActor P {}
778+
"""
779+
)
780+
781+
}
782+
768783
func testParseDynamicReplacement() {
769784
assertParse(
770785
"""

0 commit comments

Comments
 (0)