|
1 |
| -// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -I %t -I %S/Inputs/custom-modules -print-module -source-filename %s -module-to-print=ImportAsMember.Proto -always-argument-labels > %t.printed.Proto.txt |
2 |
| - |
3 |
| -// RUN: %FileCheck %s -check-prefix=PRINT-PROTO -strict-whitespace < %t.printed.Proto.txt |
4 |
| - |
5 |
| -// PRINT-PROTO-LABEL: protocol ImportedProtocolBase : NSObjectProtocol { |
6 |
| -// PRINT-PROTO-NEXT: } |
7 |
| -// PRINT-PROTO-NEXT: typealias ImportedProtocolBase_t = ImportedProtocolBase |
8 |
| -// PRINT-PROTO-NEXT: protocol IAMProto : ImportedProtocolBase { |
9 |
| -// PRINT-PROTO-NEXT: } |
10 |
| -// PRINT-PROTO-NEXT: typealias IAMProto_t = IAMProto |
11 |
| -// PRINT-PROTO-NEXT: extension IAMProto { |
12 |
| -// PRINT-PROTO-NEXT: func mutateSomeState() |
13 |
| -// PRINT-PROTO-NEXT: func mutateSomeState(withParameter _: Int) |
14 |
| -// PRINT-PROTO-NEXT: func mutateSomeState(withFirstParameter _: Int) |
15 |
| -// PRINT-PROTO-NEXT: var someValue: Int32 |
16 |
| -// PRINT-PROTO-NEXT: } |
17 |
| - |
18 | 1 | // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -I %t -I %S/Inputs/custom-modules -print-module -source-filename %s -module-to-print=ImportAsMember.Class -always-argument-labels > %t.printed.Class.txt
|
19 | 2 |
|
20 | 3 | // RUN: %FileCheck %s -check-prefix=PRINT-CLASS -strict-whitespace < %t.printed.Class.txt
|
|
37 | 20 | // REQUIRES: objc_interop
|
38 | 21 |
|
39 | 22 | import Foundation
|
40 |
| -import ImportAsMember.Proto |
41 | 23 | import ImportAsMember.Class
|
42 | 24 | import IAMError
|
43 | 25 |
|
44 | 26 | // Errors
|
45 | 27 | ErrorStruct.hasPrototype();
|
46 | 28 |
|
47 |
| -// Protocols |
48 |
| -@objc class Foo : NSObject, IAMProto {} |
49 |
| - |
50 |
| -struct Bar : IAMProto {} |
51 |
| - // expected-error@-1{{non-class type 'Bar' cannot conform to class protocol 'IAMProto'}} |
52 |
| - // expected-error@-2{{non-class type 'Bar' cannot conform to class protocol 'ImportedProtocolBase'}} |
53 |
| - // expected-error@-3{{non-class type 'Bar' cannot conform to class protocol 'NSObjectProtocol'}} |
54 |
| - |
55 |
| -@objc class FooErr : NSObject, ErrorProto {} |
56 |
| - |
57 |
| -let foo = Foo() |
58 |
| -foo.mutateSomeState() |
59 |
| - |
60 |
| -let fooErr = FooErr() |
61 |
| -fooErr.mutateSomeInstanceState() |
62 |
| -FooErr.mutateSomeStaticState() |
63 |
| - // expected-error@-1{{type 'FooErr' has no member 'mutateSomeStaticState'}} |
64 |
| - |
65 |
| - |
66 | 29 | // Import into members of an imported, renamed class.
|
67 | 30 | let someClassOpts: SomeClass.Options = .fuzzyDice
|
68 | 31 | let someClass = SomeClass(value: 3.14159)
|
|
0 commit comments