Files
swift-mirror/validation-test/Serialization/AllowErrors/invalid-attr-refs.swift
Ben Barham 6d038c86bc [Serialization] Skip deserializing invalid attributes if allowing errors
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).
2021-06-02 11:45:29 +10:00

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