mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A bug in `@objc @implementation` is causing incorrect `@_hasStorage` attributes to be printed into module interfaces. As an initial step towards fixing this, diagnose bad `@_hasStorage` attributes and treat them as computed properties so that these malformed interfaces don’t cause compiler crashes. Partially fixes rdar://144811653.
11 lines
447 B
Plaintext
11 lines
447 B
Plaintext
// swift-interface-format-version: 1.0
|
|
// swift-module-flags:
|
|
// expected-error@-2 {{failed to verify module interface of 'Test' due to the errors above}}
|
|
|
|
// RUN: %target-swift-typecheck-module-from-interface(%s) -module-name Test -verify -verify-ignore-unknown
|
|
// REQUIRES: OS=macosx
|
|
|
|
extension Array {
|
|
@_hasStorage public var foo: Int { get set } // expected-error {{'@_hasStorage' attribute cannot be applied to declaration in extension}}
|
|
}
|