mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, requests would fail silently by returning an empty struct in the response. With this change, responses will properly report fail with the internal error.
18 lines
1.1 KiB
Swift
18 lines
1.1 KiB
Swift
import Foo
|
|
|
|
func foo2 () {
|
|
_ = FooClassBase(float: 2.3)
|
|
_ = FooClassBase(float: 2.3, second: 2)
|
|
}
|
|
|
|
// REQUIRES: objc_interop
|
|
// RUN: %sourcekitd-test -req=translate -objc-selector initWithFloat2: -pos=4:15 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK1 %s
|
|
// RUN: %sourcekitd-test -req=translate -objc-selector initWithFloat2 -pos=4:15 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK1 %s
|
|
// RUN: %sourcekitd-test -req=translate -objc-selector initWithFloat2:second2: -pos=5:15 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK2 %s
|
|
// RUN: not %sourcekitd-test -req=translate -objc-selector initWithFloat2:second2:third: -pos=5:15 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s 2>&1 | %FileCheck -check-prefix=CHECK-FAIL %s
|
|
// RUN: %sourcekitd-test -req=translate -objc-selector initFloat2:second2: -pos=5:15 %s -- -F %S/Inputs/mock-sdk -I %t.tmp %mcp_opt %s | %FileCheck -check-prefix=CHECK2 %s
|
|
|
|
// CHECK-FAIL: (Request Failed): Unable to resolve ObjC declaration name
|
|
// CHECK1: init(float2:)
|
|
// CHECK2: init(float2:second2:)
|