Skip to content

Migrate more tests to Swift 4 #17535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/ClangImporter/SceneKit_test.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -swift-version 3
// RUN: %target-typecheck-verify-swift

// REQUIRES: objc_interop
// REQUIRES: OS=macosx
Expand Down Expand Up @@ -190,7 +190,7 @@ func useRenamedAPIs(actionable: SCNActionable, action: SCNAction, data: Data,
let _ = SCNIKConstraint.inverseKinematicsConstraint(chainRootNode: node)

let _ = geometry.material(named: "mat")
let _ = geometry.getGeometrySources(for: semantic)
let _ = geometry.sources(for: semantic)
let geoSrc = SCNGeometrySource(data: data, semantic: semantic, vectorCount: 2,
usesFloatComponents: false,
componentsPerVector: 3,
Expand Down
4 changes: 2 additions & 2 deletions test/ClangImporter/ctypes_parse.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift %clang-importer-sdk -swift-version 3
// RUN: %target-typecheck-verify-swift %clang-importer-sdk

import ctypes

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

func testVaList() {
Expand Down
6 changes: 3 additions & 3 deletions test/ClangImporter/foreign_errors.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -parse-as-library -verify %s -swift-version 3
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -O -parse-as-library -DEMIT_SIL %s -swift-version 3
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -parse-as-library -verify %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -O -parse-as-library -DEMIT_SIL %s

// REQUIRES: objc_interop

Expand All @@ -17,7 +17,7 @@ func test0() {
func testAndReturnError() throws {
try ErrorProne.fail()
try ErrorProne.go()
try ErrorProne.tryAndReturnError() // collides with 'try' keyword
try ErrorProne.tryAndReturnError(()) // collides with 'try' keyword

ErrorProne.messUpSignatureAndReturnError(nil) // wrong signature
}
Expand Down
12 changes: 6 additions & 6 deletions test/ClangImporter/objc_bridging_custom.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %empty-directory(%t)
// 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
// 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

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

// REQUIRES: objc_interop

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

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

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

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

class TestObjCProtoImpl : NSObject, TestObjCProto {
@objcMembers class TestObjCProtoImpl : NSObject, TestObjCProto {
// expected-note@+2 {{private}} expected-note@+2 {{@nonobjc}} expected-note@+2 {{extension}}
// expected-note@+1 {{candidate has non-matching type '(APPRefrigerator, APPRefrigerator?) -> APPRefrigerator'}} {{16-31=Refrigerator}} {{36-52=Refrigerator?}} {{57-72=Refrigerator}}
func test(a: APPRefrigerator, b: APPRefrigerator?) -> APPRefrigerator { // expected-warning {{instance method 'test(a:b:)' nearly matches optional requirement 'test(a:b:)' of protocol 'TestObjCProto'}}
Expand Down
8 changes: 4 additions & 4 deletions test/ClangImporter/objc_init_redundant.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s -verify -swift-version 3
// 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
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s -verify
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/Inputs/custom-modules) -emit-sil %s > %t.log 2>&1
// RUN: %FileCheck %s < %t.log

// REQUIRES: objc_interop
Expand All @@ -8,8 +8,8 @@ import Foundation

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

Expand Down
8 changes: 4 additions & 4 deletions test/ClangImporter/objc_ir.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// RUN: %empty-directory(%t)
// RUN: %build-clang-importer-objc-overlays
// 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
// 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

// REQUIRES: objc_interop
// REQUIRES: OS=macosx
Expand Down Expand Up @@ -119,7 +119,7 @@ func protocolMetatype(p: FooProto) -> FooProto.Type {
// CHECK: [[SWIFT_RESULT:%.+]] = call %swift.type* @swift_getObjCClassMetadata(%objc_class* [[CASTED_RESULT]])
// CHECK-NOT: call void @swift_unknownRelease(%objc_object* %0)
// CHECK: ret %swift.type* [[SWIFT_RESULT]]
let type = processFooType(type(of: p))
let type = processFooType(Swift.type(of: p))
return type
} // CHECK: }

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

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

Expand Down
6 changes: 3 additions & 3 deletions test/ClangImporter/objc_override.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown -swift-version 3
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown

// REQUIRES: objc_interop

import Foundation
import ObjCParseExtras

class MyArray : DummyClass {
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}}
@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}}

@objc(objectAtIndexedSubscript:)
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}}
Expand All @@ -16,7 +16,7 @@ class SomeCellSub1 : SomeCell {
init(string: String) { super.init(string: string) } // expected-error{{overriding declaration requires an 'override' keyword}}{{3-3=override }}

// okay: should not conflict
func initWithString(_ string: String) { }
@objc func initWithString(_ string: String) { }

var isEnabled: Bool { // expected-error{{overriding declaration requires an 'override' keyword}}
get { return super.isEnabled }
Expand Down
6 changes: 3 additions & 3 deletions test/ClangImporter/objc_parse.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -swift-version 3
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify

// REQUIRES: objc_interop

Expand Down Expand Up @@ -538,11 +538,11 @@ func testProtocolQualified(_ obj: CopyableNSObject, cell: CopyableSomeCell,

_ = cell as NSObject
_ = cell as NSObjectProtocol
_ = 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!}}
_ = cell as NSCopying
_ = cell as SomeCell

_ = 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!}}
_ = plainCell as CopyableSomeCell // FIXME: This is not really typesafe.
_ = plainCell as CopyableSomeCell // expected-error {{'SomeCell' is not convertible to 'CopyableSomeCell' (aka 'SomeCell & NSCopying'); did you mean to use 'as!' to force downcast?}}
}

extension Printing {
Expand Down
11 changes: 6 additions & 5 deletions test/ClangImporter/objc_protocol_renaming.swift
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
// RUN: %empty-directory(%t)

// FIXME: BEGIN -enable-source-import hackaround
// 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
// 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
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
// FIXME: END -enable-source-import hackaround

// 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
// 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

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

// REQUIRES: objc_interop

import Foundation
import ProtoRenaming
import ImplementProtoRenaming

// SR-3917: compiler crash when using an "old" name for an imported requirement
class MyGraphViewSubclass : MyGraphView {
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}}
@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}}
}
5 changes: 2 additions & 3 deletions test/ClangImporter/typedef_with_generic_param.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/typedef-with-generic-param.h -swift-version 3 2>&1
// RUN: %target-swift-frontend -typecheck %s -import-objc-header %S/Inputs/typedef-with-generic-param.h 2>&1

// REQUIRES: OS=macosx

typealias Result<T> = (T?, Error?)
typealias Handler<T> = (Result<T>) -> Void
typealias Handler<T> = (T?, Error?) -> Void

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

Expand Down
4 changes: 2 additions & 2 deletions test/DebugInfo/WeakCapture.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - -swift-version 3 | %FileCheck %s
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
class A {
init(handler: (() -> ())) { }
}
Expand All @@ -15,7 +15,7 @@ func function() {
// CHECK: call void @llvm.dbg.{{.*}}(metadata %swift.weak*
// CHECK-NOT: metadata [[B]]
// CHECK: call
A(handler: { [weak b] _ in
A(handler: { [weak b] in
if b != nil { }
})
}
Expand Down
4 changes: 2 additions & 2 deletions test/DebugInfo/closure-arg-linetable.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - -swift-version 3 | %FileCheck %s
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s

public class C {

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

func doSomethingWithHandler(_ theHandler: ((Void) -> Void)!) -> Void {
func doSomethingWithHandler(_ theHandler: (() -> Void)!) -> Void {
theHandler()
}

Expand Down
4 changes: 2 additions & 2 deletions test/DebugInfo/nostorage.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o %t -swift-version 3
// RUN: %target-swift-frontend %s -emit-ir -g -o %t
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK1
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK2
// RUN: cat %t | %FileCheck %s --check-prefix=CHECK3
Expand All @@ -15,7 +15,7 @@ public class Foo {
// CHECK1-SAME: type: ![[METAFOO:[0-9]+]]
// CHECK1: ![[METAFOO]] = !DICompositeType(tag: DW_TAG_structure_type,
// CHECK1-SAME: flags:
let type = type(of: self)
let type = Swift.type(of: self)
used(type)
}()
}
Expand Down
6 changes: 3 additions & 3 deletions test/DebugInfo/objc_generic_class_debug_info.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

// REQUIRES: objc_interop

Expand All @@ -8,8 +8,8 @@ import Foundation
import objc_generics

public extension GenericClass {
func method() {}
class func classMethod() {}
@objc func method() {}
@objc class func classMethod() {}
}

public func takesFunction<T : AnyObject>(fn: @escaping (GenericClass<T>) -> ()) -> (GenericClass<T>) -> () {
Expand Down
14 changes: 7 additions & 7 deletions test/DebugInfo/test-foundation.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -emit-ir -g %s -o %t.ll -swift-version 3
// RUN: %target-swift-frontend -emit-ir -g %s -o %t.ll
// RUN: %FileCheck %s --check-prefix IMPORT-CHECK < %t.ll
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
// RUN: llc %t.ll -filetype=obj -o %t.o
Expand All @@ -15,21 +15,21 @@ class MyObject : NSObject {
// LOC-CHECK: define {{.*}} @"$S4main8MyObjectC0B3ArrSo7NSArrayCvgTo"
// LOC-CHECK: ret {{.*}}, !dbg ![[DBG:.*]]
// LOC-CHECK: ret
var MyArr = NSArray()
@objc var MyArr = NSArray()
// IMPORT-CHECK: filename: "test-foundation.swift"
// IMPORT-CHECK-DAG: [[FOUNDATION:[0-9]+]] = !DIModule({{.*}} name: "Foundation",{{.*}} includePath:
// IMPORT-CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "NSArray", scope: ![[NSARRAY:[0-9]+]]
// IMPORT-CHECK-DAG: ![[NSARRAY]] = !DIModule(scope: ![[FOUNDATION:[0-9]+]], name: "NSArray"
// IMPORT-CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, {{.*}}entity: ![[FOUNDATION]]

func foo(_ obj: MyObject) {
@objc func foo(_ obj: MyObject) {
return obj.foo(obj)
}
}

// SANITY-DAG: !DISubprogram(name: "blah",{{.*}} line: [[@LINE+2]],{{.*}} isDefinition: true
extension MyObject {
func blah() {
@objc func blah() {
var _ = MyObject()
}
}
Expand All @@ -46,9 +46,9 @@ public func err() {
// DWARF-CHECK: DW_AT_name ("NSError")
// DWARF-CHECK: DW_AT_linkage_name{{.*}}$SSo7NSErrorC
let _ = NSError(domain: "myDomain", code: 4,
userInfo: [AnyHashable("a"):1,
AnyHashable("b"):2,
AnyHashable("c"):3])
userInfo: ["a":1,
"b":2,
"c":3])
}

// LOC-CHECK: define {{.*}}4date
Expand Down
6 changes: 3 additions & 3 deletions test/DebugInfo/thunks.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %target-swift-frontend -emit-ir -g %s -o - -swift-version 3 | %FileCheck %s
// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -g %s -o - -swift-version 3 | %FileCheck %s --check-prefix=SIL-CHECK
// RUN: %target-swift-frontend -emit-ir -g %s -o - | %FileCheck %s
// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -g %s -o - | %FileCheck %s --check-prefix=SIL-CHECK
// REQUIRES: objc_interop
import Foundation

class Foo : NSObject {
dynamic func foo(_ f: (Int64) -> Int64, x: Int64) -> Int64 {
@objc dynamic func foo(_ f: (Int64) -> Int64, x: Int64) -> Int64 {
return f(x)
}
}
Expand Down
8 changes: 4 additions & 4 deletions test/IDE/Inputs/AnyObject/bar_swift_module.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Import this class in the test.
@objc public class Bar_ImportedObjcClass {
public func bar_ImportedObjcClass_InstanceFunc1() {}
public class func bar_ImportedObjcClass_ClassFunc1() {}
public subscript(i: Bar_ImportedObjcClass) -> Int {
@objc public func bar_ImportedObjcClass_InstanceFunc1() {}
@objc public class func bar_ImportedObjcClass_ClassFunc1() {}
@objc public subscript(i: Bar_ImportedObjcClass) -> Int {
get {
return 0
}
}
public var bar_ImportedObjcClass_Property1: Int = 0
@objc public var bar_ImportedObjcClass_Property1: Int = 0
}

// Don't import this class in the test.
Expand Down
Loading