Skip to content

Commit bc4b0d1

Browse files
authored
Merge pull request #17535 from slavapestov/migrate-more-tests-to-swift4
Migrate more tests to Swift 4
2 parents 886b01c + 5964c00 commit bc4b0d1

38 files changed

+272
-286
lines changed

test/ClangImporter/SceneKit_test.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
// REQUIRES: objc_interop
44
// REQUIRES: OS=macosx
@@ -190,7 +190,7 @@ func useRenamedAPIs(actionable: SCNActionable, action: SCNAction, data: Data,
190190
let _ = SCNIKConstraint.inverseKinematicsConstraint(chainRootNode: node)
191191

192192
let _ = geometry.material(named: "mat")
193-
let _ = geometry.getGeometrySources(for: semantic)
193+
let _ = geometry.sources(for: semantic)
194194
let geoSrc = SCNGeometrySource(data: data, semantic: semantic, vectorCount: 2,
195195
usesFloatComponents: false,
196196
componentsPerVector: 3,

test/ClangImporter/ctypes_parse.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 %clang-importer-sdk -swift-version 3
1+
// RUN: %target-typecheck-verify-swift %clang-importer-sdk
22

33
import ctypes
44

@@ -227,7 +227,7 @@ func testArrays() {
227227
// It would also be nice to warn here about the arrays being too short, but
228228
// that's probably beyond us for a while.
229229
staticBoundsArray([])
230-
staticBoundsArray(nil) // no-error
230+
staticBoundsArray(nil) // expected-error {{'nil' is not compatible with expected argument type 'UnsafePointer<Int8>'}}
231231
}
232232

233233
func testVaList() {

test/ClangImporter/foreign_errors.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -parse-as-library -verify %s -swift-version 3
2-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -O -parse-as-library -DEMIT_SIL %s -swift-version 3
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -parse-as-library -verify %s
2+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -O -parse-as-library -DEMIT_SIL %s
33

44
// REQUIRES: objc_interop
55

@@ -17,7 +17,7 @@ func test0() {
1717
func testAndReturnError() throws {
1818
try ErrorProne.fail()
1919
try ErrorProne.go()
20-
try ErrorProne.tryAndReturnError() // collides with 'try' keyword
20+
try ErrorProne.tryAndReturnError(()) // collides with 'try' keyword
2121

2222
ErrorProne.messUpSignatureAndReturnError(nil) // wrong signature
2323
}

test/ClangImporter/objc_bridging_custom.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift -module-name Appliances -o %t -swift-version 3
2+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift -module-name Appliances -o %t
33

4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/../Inputs/ObjCBridging -I %t -parse-as-library -verify %s -swift-version 3
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/../Inputs/ObjCBridging -I %t -parse-as-library -verify %s
55

66
// REQUIRES: objc_interop
77

@@ -13,7 +13,7 @@ func checkThatBridgingIsWorking(fridge: Refrigerator) {
1313
_ = bridgedFridge as Refrigerator // no-warning
1414
}
1515

16-
class Base : NSObject {
16+
@objcMembers class Base : NSObject {
1717
func test(a: Refrigerator, b: Refrigerator) -> Refrigerator? { // expected-note {{potential overridden instance method 'test(a:b:)' here}}
1818
return nil
1919
}
@@ -42,7 +42,7 @@ class Base : NSObject {
4242
var propGeneric: ManufacturerInfo<NSString> // expected-note {{attempt to override property here}}
4343
}
4444

45-
class Sub : Base {
45+
@objcMembers class Sub : Base {
4646
// expected-note@+1 {{type does not match superclass instance method with type '(Refrigerator, Refrigerator) -> Refrigerator?'}} {{25-40=Refrigerator}} {{45-61=Refrigerator?}} {{66-81=Refrigerator}}
4747
override func test(a: APPRefrigerator, b: APPRefrigerator?) -> APPRefrigerator { // expected-error {{method does not override any method from its superclass}} {{none}}
4848
return a
@@ -108,7 +108,7 @@ protocol TestProto {
108108
var propGeneric: ManufacturerInfo<NSString>? { get } // expected-note {{protocol requires}}
109109
}
110110

111-
class TestProtoImpl : NSObject, TestProto { // expected-error {{type 'TestProtoImpl' does not conform to protocol 'TestProto'}}
111+
@objcMembers class TestProtoImpl : NSObject, TestProto { // expected-error {{type 'TestProtoImpl' does not conform to protocol 'TestProto'}}
112112
// expected-note@+1 {{candidate has non-matching type '(APPRefrigerator, APPRefrigerator?) -> APPRefrigerator'}} {{16-31=Refrigerator}} {{36-52=Refrigerator?}} {{57-72=Refrigerator}}
113113
func test(a: APPRefrigerator, b: APPRefrigerator?) -> APPRefrigerator {
114114
return a
@@ -166,7 +166,7 @@ class TestProtoImpl : NSObject, TestProto { // expected-error {{type 'TestProtoI
166166
@objc optional var propGeneric: ManufacturerInfo<NSString>? { get } // expected-note {{here}} {{none}}
167167
}
168168

169-
class TestObjCProtoImpl : NSObject, TestObjCProto {
169+
@objcMembers class TestObjCProtoImpl : NSObject, TestObjCProto {
170170
// expected-note@+2 {{private}} expected-note@+2 {{@nonobjc}} expected-note@+2 {{extension}}
171171
// expected-note@+1 {{candidate has non-matching type '(APPRefrigerator, APPRefrigerator?) -> APPRefrigerator'}} {{16-31=Refrigerator}} {{36-52=Refrigerator?}} {{57-72=Refrigerator}}
172172
func test(a: APPRefrigerator, b: APPRefrigerator?) -> APPRefrigerator { // expected-warning {{instance method 'test(a:b:)' nearly matches optional requirement 'test(a:b:)' of protocol 'TestObjCProto'}}

test/ClangImporter/objc_init_redundant.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s -verify -swift-version 3
2-
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s -swift-version 3 > %t.log 2>&1
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s -verify
2+
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s > %t.log 2>&1
33
// RUN: %FileCheck %s < %t.log
44

55
// REQUIRES: objc_interop
@@ -8,8 +8,8 @@ import Foundation
88

99
// rdar://problem/17687082
1010
extension NSObject {
11-
convenience init() { self.init() } // expected-error{{initializer 'init()' with Objective-C selector 'init' conflicts with previous declaration with the same Objective-C selector}}
12-
// CHECK: objc_init_redundant.swift:[[@LINE-1]]:15: error: initializer 'init()' with Objective-C selector 'init' conflicts
11+
@objc convenience init() { self.init() } // expected-error{{initializer 'init()' with Objective-C selector 'init' conflicts with previous declaration with the same Objective-C selector}}
12+
// CHECK: objc_init_redundant.swift:[[@LINE-1]]:21: error: initializer 'init()' with Objective-C selector 'init' conflicts
1313
// CHECK: ObjectiveC.NSObject{{.*}}note: 'init' previously declared here
1414
}
1515

test/ClangImporter/objc_ir.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// RUN: %empty-directory(%t)
33
// RUN: %build-clang-importer-objc-overlays
4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s -swift-version 3 | %FileCheck %s
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s
55

66
// REQUIRES: objc_interop
77
// REQUIRES: OS=macosx
@@ -119,7 +119,7 @@ func protocolMetatype(p: FooProto) -> FooProto.Type {
119119
// CHECK: [[SWIFT_RESULT:%.+]] = call %swift.type* @swift_getObjCClassMetadata(%objc_class* [[CASTED_RESULT]])
120120
// CHECK-NOT: call void @swift_unknownRelease(%objc_object* %0)
121121
// CHECK: ret %swift.type* [[SWIFT_RESULT]]
122-
let type = processFooType(type(of: p))
122+
let type = processFooType(Swift.type(of: p))
123123
return type
124124
} // CHECK: }
125125

@@ -136,7 +136,7 @@ func protocolCompositionMetatype(p: Impl) -> (FooProto & AnotherProto).Type {
136136
// CHECK: [[SWIFT_RESULT:%.+]] = call %swift.type* @swift_getObjCClassMetadata(%objc_class* [[CASTED_RESULT]])
137137
// CHECK-NOT: call void bitcast (void (%swift.refcounted*)* @swift_release to void (%T7objc_ir4ImplC*)*)(%T7objc_ir4ImplC* %0)
138138
// CHECK: ret %swift.type* [[SWIFT_RESULT]]
139-
let type = processComboType(type(of: p))
139+
let type = processComboType(Swift.type(of: p))
140140
return type
141141
} // CHECK: }
142142

@@ -149,7 +149,7 @@ func protocolCompositionMetatype2(p: Impl) -> (FooProto & AnotherProto).Type {
149149
// CHECK: [[SWIFT_RESULT:%.+]] = call %swift.type* @swift_getObjCClassMetadata(%objc_class* [[CASTED_RESULT]])
150150
// CHECK-NOT: @swift_release
151151
// CHECK: ret %swift.type* [[SWIFT_RESULT]]
152-
let type = processComboType2(type(of: p))
152+
let type = processComboType2(Swift.type(of: p))
153153
return type
154154
} // CHECK: }
155155

test/ClangImporter/objc_override.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown -swift-version 3
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

55
import Foundation
66
import ObjCParseExtras
77

88
class MyArray : DummyClass {
9-
func setBoolProperty(_ x: Bool) { } // expected-error{{method 'setBoolProperty' with Objective-C selector 'setBoolProperty:' conflicts with setter for 'boolProperty' from superclass 'DummyClass' with the same Objective-C selector}}
9+
@objc func setBoolProperty(_ x: Bool) { } // expected-error{{method 'setBoolProperty' with Objective-C selector 'setBoolProperty:' conflicts with setter for 'boolProperty' from superclass 'DummyClass' with the same Objective-C selector}}
1010

1111
@objc(objectAtIndexedSubscript:)
1212
func getObjectAt(_ i: Int) { } // expected-error{{method 'getObjectAt' with Objective-C selector 'objectAtIndexedSubscript:' conflicts with method 'objectAtIndexedSubscript' from superclass 'DummyClass' with the same Objective-C selector}}
@@ -16,7 +16,7 @@ class SomeCellSub1 : SomeCell {
1616
init(string: String) { super.init(string: string) } // expected-error{{overriding declaration requires an 'override' keyword}}{{3-3=override }}
1717

1818
// okay: should not conflict
19-
func initWithString(_ string: String) { }
19+
@objc func initWithString(_ string: String) { }
2020

2121
var isEnabled: Bool { // expected-error{{overriding declaration requires an 'override' keyword}}
2222
get { return super.isEnabled }

test/ClangImporter/objc_parse.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -swift-version 3
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
22

33
// REQUIRES: objc_interop
44

@@ -538,11 +538,11 @@ func testProtocolQualified(_ obj: CopyableNSObject, cell: CopyableSomeCell,
538538

539539
_ = cell as NSObject
540540
_ = cell as NSObjectProtocol
541-
_ = cell as NSCopying // expected-error {{'CopyableSomeCell' (aka 'SomeCell') is not convertible to 'NSCopying'; did you mean to use 'as!' to force downcast?}} {{12-14=as!}}
541+
_ = cell as NSCopying
542542
_ = cell as SomeCell
543543

544544
_ = plainObj as CopyableNSObject // expected-error {{'NSObject' is not convertible to 'CopyableNSObject' (aka 'NSCopying & NSObjectProtocol'); did you mean to use 'as!' to force downcast?}} {{16-18=as!}}
545-
_ = plainCell as CopyableSomeCell // FIXME: This is not really typesafe.
545+
_ = plainCell as CopyableSomeCell // expected-error {{'SomeCell' is not convertible to 'CopyableSomeCell' (aka 'SomeCell & NSCopying'); did you mean to use 'as!' to force downcast?}}
546546
}
547547

548548
extension Printing {
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
// RUN: %empty-directory(%t)
22

33
// FIXME: BEGIN -enable-source-import hackaround
4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift -swift-version 3
5-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift -swift-version 3
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift
5+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
66
// FIXME: END -enable-source-import hackaround
77

8-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %S/Inputs/custom-modules -I %t) -emit-module -o %t %S/Inputs/ImplementProtoRenaming.swift -swift-version 3
8+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %S/Inputs/custom-modules -I %t) -emit-module -o %t %S/Inputs/ImplementProtoRenaming.swift
99

10-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %S/Inputs/custom-modules -I %t) -typecheck %s -verify -swift-version 3
10+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %S/Inputs/custom-modules -I %t) -typecheck %s -verify
1111

1212
// REQUIRES: objc_interop
1313

14+
import Foundation
1415
import ProtoRenaming
1516
import ImplementProtoRenaming
1617

1718
// SR-3917: compiler crash when using an "old" name for an imported requirement
1819
class MyGraphViewSubclass : MyGraphView {
19-
func doSomethingToGraphView(_ view: GraphView) { } // expected-error{{method 'doSomethingToGraphView' with Objective-C selector 'doSomethingToGraphView:' conflicts with method 'doSomething(to:)' from superclass 'MyGraphView' with the same Objective-C selector}}
20+
@objc func doSomethingToGraphView(_ view: GraphView) { } // expected-error{{method 'doSomethingToGraphView' with Objective-C selector 'doSomethingToGraphView:' conflicts with method 'doSomething(to:)' from superclass 'MyGraphView' with the same Objective-C selector}}
2021
}

test/ClangImporter/typedef_with_generic_param.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/typedef-with-generic-param.h -swift-version 3 2>&1
1+
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/typedef-with-generic-param.h 2>&1
22

33
// REQUIRES: OS=macosx
44

5-
typealias Result<T> = (T?, Error?)
6-
typealias Handler<T> = (Result<T>) -> Void
5+
typealias Handler<T> = (T?, Error?) -> Void
76

87
func foo<T>(_ handler: Handler<T>?) {}
98

test/DebugInfo/WeakCapture.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - -swift-version 3 | %FileCheck %s
1+
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
22
class A {
33
init(handler: (() -> ())) { }
44
}
@@ -15,7 +15,7 @@ func function() {
1515
// CHECK: call void @llvm.dbg.{{.*}}(metadata %swift.weak*
1616
// CHECK-NOT: metadata [[B]]
1717
// CHECK: call
18-
A(handler: { [weak b] _ in
18+
A(handler: { [weak b] in
1919
if b != nil { }
2020
})
2121
}

test/DebugInfo/closure-arg-linetable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - -swift-version 3 | %FileCheck %s
1+
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
22

33
public class C {
44

@@ -11,7 +11,7 @@ public class C {
1111
// CHECK: ![[DBG]] = !DILocation(line: 0, scope: ![[CURRY_THUNK]])
1212
func someHandler() { }
1313

14-
func doSomethingWithHandler(_ theHandler: ((Void) -> Void)!) -> Void {
14+
func doSomethingWithHandler(_ theHandler: (() -> Void)!) -> Void {
1515
theHandler()
1616
}
1717

test/DebugInfo/nostorage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o %t -swift-version 3
1+
// RUN: %target-swift-frontend %s -emit-ir -g -o %t
22
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK1
33
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK2
44
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK3
@@ -15,7 +15,7 @@ public class Foo {
1515
// CHECK1-SAME: type: ![[METAFOO:[0-9]+]]
1616
// CHECK1: ![[METAFOO]] = !DICompositeType(tag: DW_TAG_structure_type,
1717
// CHECK1-SAME: flags:
18-
let type = type(of: self)
18+
let type = Swift.type(of: self)
1919
used(type)
2020
}()
2121
}

test/DebugInfo/objc_generic_class_debug_info.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir -g -verify -swift-version 3
2+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir -g -verify
33

44
// REQUIRES: objc_interop
55

@@ -8,8 +8,8 @@ import Foundation
88
import objc_generics
99

1010
public extension GenericClass {
11-
func method() {}
12-
class func classMethod() {}
11+
@objc func method() {}
12+
@objc class func classMethod() {}
1313
}
1414

1515
public func takesFunction<T : AnyObject>(fn: @escaping (GenericClass<T>) -> ()) -> (GenericClass<T>) -> () {

test/DebugInfo/test-foundation.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -g %s -o %t.ll -swift-version 3
1+
// RUN: %target-swift-frontend -emit-ir -g %s -o %t.ll
22
// RUN: %FileCheck %s --check-prefix IMPORT-CHECK < %t.ll
33
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
44
// RUN: llc %t.ll -filetype=obj -o %t.o
@@ -15,21 +15,21 @@ class MyObject : NSObject {
1515
// LOC-CHECK: define {{.*}} @"$S4main8MyObjectC0B3ArrSo7NSArrayCvgTo"
1616
// LOC-CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
1717
// LOC-CHECK: ret
18-
var MyArr = NSArray()
18+
@objc var MyArr = NSArray()
1919
// IMPORT-CHECK: filename: "test-foundation.swift"
2020
// IMPORT-CHECK-DAG: [[FOUNDATION:[0-9]+]] = !DIModule({{.*}} name: "Foundation",{{.*}} includePath:
2121
// IMPORT-CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "NSArray", scope: ![[NSARRAY:[0-9]+]]
2222
// IMPORT-CHECK-DAG: ![[NSARRAY]] = !DIModule(scope: ![[FOUNDATION:[0-9]+]], name: "NSArray"
2323
// IMPORT-CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, {{.*}}entity: ![[FOUNDATION]]
2424

25-
func foo(_ obj: MyObject) {
25+
@objc func foo(_ obj: MyObject) {
2626
return obj.foo(obj)
2727
}
2828
}
2929

3030
// SANITY-DAG: !DISubprogram(name: "blah",{{.*}} line: [[@LINE+2]],{{.*}} isDefinition: true
3131
extension MyObject {
32-
func blah() {
32+
@objc func blah() {
3333
var _ = MyObject()
3434
}
3535
}
@@ -46,9 +46,9 @@ public func err() {
4646
// DWARF-CHECK: DW_AT_name ("NSError")
4747
// DWARF-CHECK: DW_AT_linkage_name{{.*}}$SSo7NSErrorC
4848
let _ = NSError(domain: "myDomain", code: 4,
49-
userInfo: [AnyHashable("a"):1,
50-
AnyHashable("b"):2,
51-
AnyHashable("c"):3])
49+
userInfo: ["a":1,
50+
"b":2,
51+
"c":3])
5252
}
5353

5454
// LOC-CHECK: define {{.*}}4date

test/DebugInfo/thunks.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// RUN: %target-swift-frontend -emit-ir -g %s -o - -swift-version 3 | %FileCheck %s
2-
// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -g %s -o - -swift-version 3 | %FileCheck %s --check-prefix=SIL-CHECK
1+
// RUN: %target-swift-frontend -emit-ir -g %s -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -g %s -o - | %FileCheck %s --check-prefix=SIL-CHECK
33
// REQUIRES: objc_interop
44
import Foundation
55

66
class Foo : NSObject {
7-
dynamic func foo(_ f: (Int64) -> Int64, x: Int64) -> Int64 {
7+
@objc dynamic func foo(_ f: (Int64) -> Int64, x: Int64) -> Int64 {
88
return f(x)
99
}
1010
}

test/IDE/Inputs/AnyObject/bar_swift_module.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Import this class in the test.
22
@objc public class Bar_ImportedObjcClass {
3-
public func bar_ImportedObjcClass_InstanceFunc1() {}
4-
public class func bar_ImportedObjcClass_ClassFunc1() {}
5-
public subscript(i: Bar_ImportedObjcClass) -> Int {
3+
@objc public func bar_ImportedObjcClass_InstanceFunc1() {}
4+
@objc public class func bar_ImportedObjcClass_ClassFunc1() {}
5+
@objc public subscript(i: Bar_ImportedObjcClass) -> Int {
66
get {
77
return 0
88
}
99
}
10-
public var bar_ImportedObjcClass_Property1: Int = 0
10+
@objc public var bar_ImportedObjcClass_Property1: Int = 0
1111
}
1212

1313
// Don't import this class in the test.

0 commit comments

Comments
 (0)