Skip to content

Commit f18c23b

Browse files
authored
Disable assign-only property analysis with Swift 6.1, #901 (#905)
1 parent 5a4b4cd commit f18c23b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
##### Breaking
44

5-
- None.
5+
- Assign-only property analysis is disabled with Swift 6.1 due to a Swift bug: https://github.com/swiftlang/swift/issues/80394.
66

77
##### Enhancements
88

Sources/Frontend/Commands/ScanCommand.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ struct ScanCommand: FrontendCommand {
202202
logger.debug(swiftVersion.fullVersion)
203203
try swiftVersion.validateVersion()
204204

205+
if swiftVersion.version.isVersion(equalTo: "6.1"), !retainAssignOnlyProperties {
206+
logger.warn("Assign-only property analysis is disabled with Swift 6.1 due to a Swift bug: https://github.com/swiftlang/swift/issues/80394.")
207+
configuration.retainAssignOnlyProperties = true
208+
}
209+
205210
let project: Project = if configuration.guidedSetup {
206211
try GuidedSetup(configuration: configuration, shell: shell, logger: logger).perform()
207212
} else {

0 commit comments

Comments
 (0)