Skip to content

Commit 90cbaee

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents e679106 + 346cf80 commit 90cbaee

26 files changed

+141
-149
lines changed

test/Constraints/diag_missing_arg.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
func nonNamedFunc(_ x: Int) {} // expected-note * {{here}}
44
nonNamedFunc() // expected-error {{missing argument for parameter #1 in call}} {{14-14=<#Int#>}}
@@ -66,7 +66,7 @@ param2FuncNonNamed3(1) // expected-error {{missing argument for parameter #2 in
6666
param2FuncNonNamed3("foo") // expected-error {{missing argument for parameter #2 in call}} {{26-26=, <#String#>}}
6767
// FIXME: Bad diagnostic. Could this be #1?
6868

69-
func unlabeledParamFollowingVariadic(_: Any..., _: Any, _: Any) {} // expected-warning {{a parameter following a variadic parameter requires a label}}; // expected-note {{here}}
69+
func unlabeledParamFollowingVariadic(_: Any..., _: Any, _: Any) {} // expected-error {{a parameter following a variadic parameter requires a label}}; // expected-note {{here}}
7070
unlabeledParamFollowingVariadic(1, 1, 1) // expected-error {{missing argument for parameter #2 in call}} {{40-40=, <#Any#>}}
7171

7272
func labeledParamFollowingVariadic(_: Any..., label: Any, _: Any) {}

test/Constraints/diagnostics.swift

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
protocol P {
44
associatedtype SomeType
@@ -85,11 +85,11 @@ for j in i.wibble(a, a) { // expected-error {{type 'A' does not conform to proto
8585

8686
// Generic as part of function/tuple types
8787
func f6<T:P2>(_ g: (Void) -> T) -> (c: Int, i: T) { // expected-warning {{when calling this function in Swift 4 or later, you must pass a '()' tuple; did you mean for the input type to be '()'?}} {{20-26=()}}
88-
return (c: 0, i: g())
88+
return (c: 0, i: g(()))
8989
}
9090

9191
func f7() -> (c: Int, v: A) {
92-
let g: (Void) -> A = { return A() } // expected-warning {{when calling this function in Swift 4 or later, you must pass a '()' tuple; did you mean for the input type to be '()'?}} {{10-16=()}}
92+
let g: (Void) -> A = { _ in return A() } // expected-warning {{when calling this function in Swift 4 or later, you must pass a '()' tuple; did you mean for the input type to be '()'?}} {{10-16=()}}
9393
return f6(g) // expected-error {{cannot convert return expression of type '(c: Int, i: A)' to return type '(c: Int, v: A)'}}
9494
}
9595

@@ -421,7 +421,10 @@ enum Color {
421421
static func frob(_ a : Int, b : inout Int) -> Color {}
422422
}
423423
let _: (Int, Color) = [1,2].map({ ($0, .Unknown("")) }) // expected-error {{'map' produces '[T]', not the expected contextual result type '(Int, Color)'}}
424-
let _: [(Int, Color)] = [1,2].map({ ($0, .Unknown("")) })// expected-error {{missing argument label 'description:' in call}} {{51-51=description: }}
424+
425+
// FIXME: rdar://41416346
426+
let _: [(Int, Color)] = [1,2].map({ ($0, .Unknown("")) })// expected-error {{'map' produces '[T]', not the expected contextual result type '[(Int, Color)]'}}
427+
425428
let _: [Color] = [1,2].map { _ in .Unknown("") }// expected-error {{missing argument label 'description:' in call}} {{44-44=description: }}
426429

427430
let _: (Int) -> (Int, Color) = { ($0, .Unknown("")) } // expected-error {{missing argument label 'description:' in call}} {{48-48=description: }}
@@ -694,7 +697,7 @@ if AssocTest.one(1) == AssocTest.one(1) {} // expected-error{{binary operator '=
694697
func r24251022() {
695698
var a = 1
696699
var b: UInt32 = 2
697-
_ = a + b // expected-warning {{deprecated}}
700+
_ = a + b // expected-error {{unavailable}}
698701
a += a + // expected-error {{binary operator '+=' cannot be applied to operands of type 'Int' and 'UInt32'}} expected-note {{overloads for '+=' exist}}
699702
b
700703
}
@@ -706,12 +709,14 @@ func overloadSetResultType(_ a : Int, b : Int) -> Int {
706709
}
707710

708711
postfix operator +++
709-
postfix func +++ <T>(_: inout T) -> T { fatalError() }
712+
postfix func +++ <T>(_: inout T) -> T { fatalError() } // expected-note {{in call to operator '+++'}}
710713

711714
// <rdar://problem/21523291> compiler error message for mutating immutable field is incorrect
712715
func r21523291(_ bytes : UnsafeMutablePointer<UInt8>) {
713-
let i = 42 // expected-note {{change 'let' to 'var' to make it mutable}}
714-
_ = bytes[i+++] // expected-error {{cannot pass immutable value as inout argument: 'i' is a 'let' constant}}
716+
let i = 42
717+
718+
// FIXME: rdar://41416382
719+
_ = bytes[i+++] // expected-error {{generic parameter 'T' could not be inferred}}
715720
}
716721

717722

@@ -863,37 +868,6 @@ func foo1255_2() -> Int {
863868
return true || false // expected-error {{cannot convert return expression of type 'Bool' to return type 'Int'}}
864869
}
865870

866-
// SR-2505: "Call arguments did not match up" assertion
867-
868-
// Here we're simulating the busted Swift 3 behavior -- see
869-
// test/Constraints/diagnostics_swift4.swift for the correct
870-
// behavior.
871-
872-
func sr_2505(_ a: Any) {} // expected-note {{}}
873-
sr_2505() // expected-error {{missing argument for parameter #1 in call}}
874-
sr_2505(a: 1) // FIXME: emit a warning saying this becomes an error in Swift 4
875-
sr_2505(1, 2) // expected-error {{extra argument in call}}
876-
sr_2505(a: 1, 2) // expected-error {{extra argument in call}}
877-
878-
struct C_2505 {
879-
init(_ arg: Any) {
880-
}
881-
}
882-
883-
protocol P_2505 {
884-
}
885-
886-
extension C_2505 {
887-
init<T>(from: [T]) where T: P_2505 {
888-
}
889-
}
890-
891-
class C2_2505: P_2505 {
892-
}
893-
894-
// FIXME: emit a warning saying this becomes an error in Swift 4
895-
let c_2505 = C_2505(arg: [C2_2505()])
896-
897871
// Diagnostic message for initialization with binary operations as right side
898872
let foo1255_3: String = 1 + 2 + 3 // expected-error {{cannot convert value of type 'Int' to specified type 'String'}}
899873
let foo1255_4: Dictionary<String, String> = ["hello": 1 + 2] // expected-error {{cannot convert value of type 'Int' to expected dictionary value type 'String'}}

test/Constraints/metatypes.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
class A {}
44
class B : A {}
@@ -15,5 +15,9 @@ let test5 : S.Type = S.self
1515
let test6 : AnyClass = S.self // expected-error {{cannot convert value of type 'S.Type' to specified type 'AnyClass' (aka 'AnyObject.Type')}}
1616

1717
func acceptMeta<T>(_ meta: T.Type) { }
18-
acceptMeta(A) // expected-warning{{missing '.self' for reference to metatype of type 'A'}}{{13-13=.self}}
19-
acceptMeta((A) -> Void) // expected-warning{{missing '.self' for reference to metatype of type '(A) -> Void'}} {{12-12=(}} {{23-23=).self}}
18+
acceptMeta(A) // expected-error {{expected member name or constructor call after type name}}
19+
// expected-note@-1 {{add arguments after the type to construct a value of the type}}
20+
// expected-note@-2 {{use '.self' to reference the type object}}
21+
22+
acceptMeta((A) -> Void) // expected-error {{expected member name or constructor call after type name}}
23+
// expected-note@-1 {{use '.self' to reference the type object}}

test/Generics/deduction.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
//===----------------------------------------------------------------------===//
44
// Deduction of generic arguments
@@ -23,7 +23,9 @@ func useIdentity(_ x: Int, y: Float, i32: Int32) {
2323
// Deduction where the result type and input type can get different results
2424
var xx : X, yy : Y
2525
xx = identity(yy) // expected-error{{cannot assign value of type 'Y' to type 'X'}}
26-
xx = identity2(yy) // expected-error{{cannot convert value of type 'Y' to expected argument type 'X'}}
26+
27+
// FIXME: rdar://41416647
28+
xx = identity2(yy) // expected-error{{type of expression is ambiguous without more context}}
2729
}
2830

2931
// FIXME: Crummy diagnostic!
@@ -78,7 +80,7 @@ func passFunction(_ f: (Int) -> Float, x: Int, y: Float) {
7880
acceptFunction(f, y, y) // expected-error{{cannot convert value of type 'Float' to expected argument type 'Int'}}
7981
}
8082

81-
func returnTuple<T, U>(_: T) -> (T, U) { } // expected-note {{in call to function 'returnTuple'}}
83+
func returnTuple<T, U>(_: T) -> (T, U) { } // expected-note 2{{in call to function 'returnTuple'}}
8284

8385
func testReturnTuple(_ x: Int, y: Float) {
8486
returnTuple(x) // expected-error{{generic parameter 'U' could not be inferred}}
@@ -87,7 +89,7 @@ func testReturnTuple(_ x: Int, y: Float) {
8789
var _ : (Float, Float) = returnTuple(y)
8890

8991
// <rdar://problem/22333090> QoI: Propagate contextual information in a call to operands
90-
var _ : (Int, Float) = returnTuple(y) // expected-error{{cannot convert value of type 'Float' to expected argument type 'Int'}}
92+
var _ : (Int, Float) = returnTuple(y) // expected-error{{generic parameter 'U' could not be inferred}}
9193
}
9294

9395

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// RUN: %target-swift-frontend -typecheck -verify -enable-objc-interop %s -swift-version 3
2-
// RUN: %target-swift-frontend -typecheck -verify -enable-objc-interop %s -parse-as-library -swift-version 3
1+
// RUN: %target-swift-frontend -typecheck -verify -enable-objc-interop %s
2+
// RUN: %target-swift-frontend -typecheck -verify -enable-objc-interop %s -parse-as-library
33

44
class Oof {
5-
dynamic func impliesObjC() { } // expected-error {{'dynamic' attribute used without importing module 'Foundation'}}
5+
@objc dynamic func impliesObjC() { }
6+
// expected-error@-1 {{'dynamic' attribute used without importing module 'Foundation'}}
7+
// expected-error@-2 {{@objc attribute used without importing module 'Foundation'}}
68
}

test/attr/attr_autoclosure.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
// Simple case.
44
var fn : @autoclosure () -> Int = 4 // expected-error {{'@autoclosure' may only be used on parameters}} expected-error {{cannot convert value of type 'Int' to specified type '() -> Int'}}
@@ -73,22 +73,22 @@ struct AutoclosureEscapeTest {
7373
func func10(@autoclosure(escaping _: () -> ()) { } // expected-error{{expected parameter name followed by ':'}}
7474
7575
func func11(_: @autoclosure(escaping) @noescape () -> ()) { } // expected-error{{@escaping conflicts with @noescape}}
76-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{28-38= @escaping}}
76+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{28-38= @escaping}}
7777

7878
class Super {
7979
func f1(_ x: @autoclosure(escaping) () -> ()) { }
80-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{28-38= @escaping}}
80+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{28-38= @escaping}}
8181
func f2(_ x: @autoclosure(escaping) () -> ()) { } // expected-note {{potential overridden instance method 'f2' here}}
82-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{28-38= @escaping}}
82+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{28-38= @escaping}}
8383
func f3(x: @autoclosure () -> ()) { }
8484
}
8585

8686
class Sub : Super {
8787
override func f1(_ x: @autoclosure(escaping)() -> ()) { }
88-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{37-47= @escaping }}
88+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{37-47= @escaping }}
8989
override func f2(_ x: @autoclosure () -> ()) { } // expected-error{{does not override any method}} // expected-note{{type does not match superclass instance method with type '(@autoclosure @escaping () -> ()) -> ()'}}
9090
override func f3(_ x: @autoclosure(escaping) () -> ()) { } // expected-error{{does not override any method}}
91-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{37-47= @escaping}}
91+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{37-47= @escaping}}
9292
}
9393

9494
func func12_sink(_ x: @escaping () -> Int) { }
@@ -99,7 +99,7 @@ func func12a(_ x: @autoclosure () -> Int) {
9999
func12_sink(x) // expected-error {{passing non-escaping parameter 'x' to function expecting an @escaping closure}}
100100
}
101101
func func12b(_ x: @autoclosure(escaping) () -> Int) {
102-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{31-41= @escaping}}
102+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{31-41= @escaping}}
103103
func12_sink(x) // ok
104104
}
105105
func func12c(_ x: @autoclosure @escaping () -> Int) {
@@ -132,7 +132,7 @@ let _ : AutoclosureFailableOf<Int> = .Success(42)
132132

133133
let _ : (@autoclosure () -> ()) -> ()
134134
let _ : (@autoclosure(escaping) () -> ()) -> ()
135-
// expected-warning@-1{{@autoclosure(escaping) is deprecated; use @autoclosure @escaping instead}} {{22-32= @escaping}}
135+
// expected-error@-1{{@autoclosure(escaping) has been removed; use @autoclosure @escaping instead}} {{22-32= @escaping}}
136136

137137
// escaping is the name of param type
138138
let _ : (@autoclosure(escaping) -> ()) -> () // expected-error {{use of undeclared type 'escaping'}}

test/attr/attr_dynamic.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -enable-objc-interop -swift-version 3
2-
// RUN: %target-swift-ide-test -enable-objc-interop -print-ast-typechecked -source-filename=%s -print-implicit-attrs -swift-version 3
1+
// RUN: %target-typecheck-verify-swift -enable-objc-interop
2+
// RUN: %target-swift-ide-test -enable-objc-interop -print-ast-typechecked -source-filename=%s -print-implicit-attrs
33

44
struct NotObjCAble {
55
var c: Foo
@@ -10,27 +10,27 @@ struct NotObjCAble {
1010
dynamic prefix operator +!+ // expected-error{{'dynamic' modifier cannot be applied to this declaration}} {{1-9=}}
1111

1212
class Foo {
13-
dynamic init() {}
14-
dynamic init(x: NotObjCAble) {} // expected-error{{method cannot be marked dynamic because the type of the parameter cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
13+
@objc dynamic init() {}
14+
@objc dynamic init(x: NotObjCAble) {} // expected-error{{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
1515

16-
dynamic var x: Int
16+
@objc dynamic var x: Int
1717

18-
dynamic var nonObjcVar: NotObjCAble // expected-error{{property cannot be marked dynamic because its type cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
18+
@objc dynamic var nonObjcVar: NotObjCAble // expected-error{{property cannot be marked @objc because its type cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
1919

20-
dynamic func foo(x: Int) {}
21-
dynamic func bar(x: Int) {}
20+
@objc dynamic func foo(x: Int) {}
21+
@objc dynamic func bar(x: Int) {}
2222

23-
dynamic func nonObjcFunc(x: NotObjCAble) {} // expected-error{{method cannot be marked dynamic because the type of the parameter cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
23+
@objc dynamic func nonObjcFunc(x: NotObjCAble) {} // expected-error{{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
2424

25-
dynamic subscript(x: Int) -> ObjCClass { get {} }
25+
@objc dynamic subscript(x: Int) -> ObjCClass { get {} }
2626

27-
dynamic subscript(x: Int) -> NotObjCAble { get {} } // expected-error{{subscript cannot be marked dynamic because its type cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
27+
@objc dynamic subscript(x: Int) -> NotObjCAble { get {} } // expected-error{{subscript cannot be marked @objc because its type cannot be represented in Objective-C}} expected-note{{Swift structs cannot be represented in Objective-C}}
2828

2929
dynamic deinit {} // expected-error{{'dynamic' modifier cannot be applied to this declaration}} {{3-11=}}
3030

3131
func notDynamic() {}
3232

33-
final dynamic func indecisive() {} // expected-error{{a declaration cannot be both 'final' and 'dynamic'}} {{9-17=}}
33+
@objc final dynamic func indecisive() {} // expected-error{{a declaration cannot be both 'final' and 'dynamic'}} {{15-23=}}
3434
}
3535

3636
struct Bar {
@@ -48,7 +48,7 @@ class InheritsDynamic: Foo {
4848
// CHECK-LABEL: {{^}} dynamic override func foo(x: Int)
4949
override func foo(x: Int) {}
5050
// CHECK-LABEL: {{^}} dynamic override func foo(x: Int)
51-
dynamic override func bar(x: Int) {}
51+
@objc dynamic override func bar(x: Int) {}
5252

5353
// CHECK: {{^}} override func notDynamic()
5454
override func notDynamic() {}

test/attr/attr_final.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22

33
class Super {
44
final var i: Int { get { return 5 } } // expected-note{{overridden declaration is here}}
@@ -40,8 +40,8 @@ protocol SomeProtocol {
4040
}
4141

4242
extension SomeProtocol {
43-
final var i: Int { return 1 } // expected-warning {{functions in a protocol extension do not need to be marked with 'final'}}
44-
final func protoExtensionFunc() {} // expected-warning {{functions in a protocol extension do not need to be marked with 'final'}} {{3-9=}}
43+
final var i: Int { return 1 } // expected-error {{only classes and class members may be marked with 'final'}} {{3-9=}}
44+
final func protoExtensionFunc() {} // expected-error {{only classes and class members may be marked with 'final'}} {{3-9=}}
4545
}
4646

4747
extension SomeStruct {

test/attr/attr_nonobjc.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 3
1+
// RUN: %target-typecheck-verify-swift
22
// REQUIRES: objc_interop
33

44
import Foundation
@@ -8,7 +8,7 @@ import Foundation
88
caloriesBurned = 5
99
}
1010

11-
func defeatEnemy(_ b: Bool) -> Bool { // expected-note {{'defeatEnemy' previously declared here}}
11+
@objc func defeatEnemy(_ b: Bool) -> Bool { // expected-note {{'defeatEnemy' previously declared here}}
1212
return !b
1313
}
1414

@@ -18,7 +18,7 @@ import Foundation
1818
}
1919

2020
// This is not allowed, though
21-
func defeatEnemy(_ s: String) -> Bool { // expected-error {{method 'defeatEnemy' with Objective-C selector 'defeatEnemy:' conflicts with previous declaration with the same Objective-C selector}}
21+
@objc func defeatEnemy(_ s: String) -> Bool { // expected-error {{method 'defeatEnemy' with Objective-C selector 'defeatEnemy:' conflicts with previous declaration with the same Objective-C selector}}
2222
return s != ""
2323
}
2424

@@ -34,9 +34,9 @@ class BlueLightSaber : LightSaber {
3434
}
3535

3636
@objc class InchoateToad {
37-
init(x: Int) {} // expected-note {{previously declared}}
37+
@objc init(x: Int) {} // expected-note {{previously declared}}
3838
@nonobjc init(x: Float) {}
39-
init(x: String) {} // expected-error {{conflicts with previous declaration with the same Objective-C selector}}
39+
@objc init(x: String) {} // expected-error {{conflicts with previous declaration with the same Objective-C selector}}
4040
}
4141

4242
@nonobjc class NonObjCClassNotAllowed { } // expected-error {{'@nonobjc' attribute cannot be applied to this declaration}} {{1-10=}}

test/attr/attr_objc_clang.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules -swift-version 3
2-
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true -disable-objc-attr-requires-foundation-module -swift-version 3 | %FileCheck %s
1+
// RUN: %target-typecheck-verify-swift -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules
2+
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true -disable-objc-attr-requires-foundation-module | %FileCheck %s
33

44
// REQUIRES: objc_interop
55

@@ -10,12 +10,12 @@ import ObjCRuntimeVisible
1010
class infer_instanceVar1 {
1111
// CHECK-LABEL: @objc class infer_instanceVar1 {
1212

13-
var var_ClangEnum: FooEnum1
14-
var var_ClangStruct: FooStruct1
13+
@objc var var_ClangEnum: FooEnum1
14+
@objc var var_ClangStruct: FooStruct1
1515
// CHECK-LABEL: @objc var var_ClangEnum: FooEnum1
1616
// CHECK-LABEL: @objc var var_ClangStruct: FooStruct1
1717

18-
init(fe: FooEnum1, fs: FooStruct1) {
18+
@objc init(fe: FooEnum1, fs: FooStruct1) {
1919
var_ClangEnum = fe
2020
var_ClangStruct = fs
2121
}

0 commit comments

Comments
 (0)