mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Most invalid attributes are skipped from serialization entirely, but custom attributes don't have their invalid bit set - the particular custom attribute (eg. a property wrapper) is requested when needed and skipped if invalid. Those checks can't set the invalid bit since the attribute could be a different custom attribute (eg. a result builder).
15 lines
400 B
Swift
15 lines
400 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -module-name errors -emit-module -o %t/errors.swiftmodule -experimental-allow-module-with-compiler-errors %s
|
|
|
|
// Property wrappers are invalid on top level code, check allowing errors
|
|
// does not crash
|
|
|
|
@propertyWrapper
|
|
public struct Wrapper<T> {
|
|
public var wrappedValue: T
|
|
public init() {}
|
|
}
|
|
@Wrapper
|
|
public var topLevelVar: Int = 10
|