Skip to content

Commit fb8bca2

Browse files
committed
Revert "guard nonisolated(unsafe) by experimental feature"
This reverts commit b57568f.
1 parent b997dc9 commit fb8bca2

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

Sources/SwiftParser/ExperimentalFeatures.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@ extension Parser.ExperimentalFeatures {
2626

2727
/// Whether to enable the parsing of 'then' statements.
2828
public static let thenStatements = Self(rawValue: 1 << 1)
29-
30-
/// Whether to enable the parsing of strict concurrency for globals.
31-
public static let globalConcurrency = Self(rawValue: 1 << 2)
3229
}

Sources/SwiftParser/Modifiers.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ extension Parser {
6161
case (.declarationModifier(.unowned), let handle)?:
6262
elements.append(self.parseUnownedModifier(handle))
6363
case (.declarationModifier(.nonisolated), let handle)?:
64-
if experimentalFeatures.contains(.globalConcurrency) {
65-
elements.append(parseNonisolatedModifier(handle))
66-
} else {
67-
let (unexpectedBeforeKeyword, keyword) = self.eat(handle)
68-
elements.append(RawDeclModifierSyntax(unexpectedBeforeKeyword, name: keyword, detail: nil, arena: self.arena))
69-
}
64+
elements.append(parseNonisolatedModifier(handle))
7065
case (.declarationModifier(.final), let handle)?,
7166
(.declarationModifier(.required), let handle)?,
7267
(.declarationModifier(.optional), let handle)?,

Tests/SwiftParserTest/DeclarationTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ final class DeclarationTests: ParserTestCase {
210210
nonisolated(unsafe) var c: Int { 0 }
211211
nonisolated(unsafe) let d = 0
212212
}
213-
""",
214-
experimentalFeatures: [.globalConcurrency]
213+
"""
215214
)
216215
}
217216

0 commit comments

Comments
 (0)