You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_ = x.memberInMixedUses // expected-error {{property 'memberInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
46
48
}
47
49
48
-
//--- function_signatures.swift
50
+
//--- function_signatures_unqualified.swift
49
51
50
-
// FIXME: The access level is wrong on many of these fix-its.
51
52
import Swift // Just here to anchor the fix-its
52
53
// expected-note 2 {{add import of module 'InternalUsesOnly'}}{{1-1=internal import InternalUsesOnly\n}}
53
-
// expected-note@-1 {{add import of module 'PackageUsesOnly'}}{{1-1=internal import PackageUsesOnly\n}}
54
-
// expected-note@-2 {{add import of module 'PublicUsesOnly'}}{{1-1=internal import PublicUsesOnly\n}}
55
-
// expected-note@-3 2 {{add import of module 'MixedUses'}}{{1-1=internal import MixedUses\n}}
54
+
// expected-note@-1 {{add import of module 'PackageUsesOnly'}}{{1-1=package import PackageUsesOnly\n}}
55
+
// expected-note@-2 {{add import of module 'PublicUsesOnly'}}{{1-1=public import PublicUsesOnly\n}}
56
+
// expected-note@-3 2 {{add import of module 'MixedUses'}}{{1-1=public import MixedUses\n}}
56
57
57
58
extensionInt{
58
59
privatefunc usesTypealiasInInternalUsesOnly_Private(x:TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
59
60
internalfunc usesTypealiasInInternalUsesOnly(x:TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
60
61
packagefunc usesTypealiasInPackageUsesOnly(x:TypealiasInPackageUsesOnly){} // expected-error {{type alias 'TypealiasInPackageUsesOnly' is not available due to missing import of defining module 'PackageUsesOnly'}}
61
62
publicfunc usesTypealiasInPublicUsesOnly(x:TypealiasInPublicUsesOnly){} // expected-error {{type alias 'TypealiasInPublicUsesOnly' is not available due to missing import of defining module 'PublicUsesOnly'}}
63
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInPublicUsesOnly' here; 'PublicUsesOnly' was not imported by this file}}
62
64
publicfunc usesTypealiasInMixedUses(x:TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
65
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInMixedUses' here; 'MixedUses' was not imported by this file}}
63
66
internalfunc usesTypealiasInMixedUses_Internal(x:TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
64
67
}
65
68
69
+
//--- function_signatures_qualified.swift
70
+
71
+
import Swift // Just here to anchor the fix-its
72
+
// expected-note 2 {{add import of module 'InternalUsesOnly'}}{{1-1=internal import InternalUsesOnly\n}}
73
+
// expected-note@-1 {{add import of module 'PackageUsesOnly'}}{{1-1=package import PackageUsesOnly\n}}
74
+
// expected-note@-2 {{add import of module 'PublicUsesOnly'}}{{1-1=public import PublicUsesOnly\n}}
75
+
// expected-note@-3 2 {{add import of module 'MixedUses'}}{{1-1=public import MixedUses\n}}
76
+
77
+
privatefunc usesTypealiasInInternalUsesOnly_Private(x:Int.TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
78
+
internalfunc usesTypealiasInInternalUsesOnly(x:Int.TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
79
+
packagefunc usesTypealiasInPackageUsesOnly(x:Int.TypealiasInPackageUsesOnly){} // expected-error {{type alias 'TypealiasInPackageUsesOnly' is not available due to missing import of defining module 'PackageUsesOnly'}}
80
+
publicfunc usesTypealiasInPublicUsesOnly(x:Int.TypealiasInPublicUsesOnly){} // expected-error {{type alias 'TypealiasInPublicUsesOnly' is not available due to missing import of defining module 'PublicUsesOnly'}}
81
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInPublicUsesOnly' here; 'PublicUsesOnly' was not imported by this file}}
82
+
publicfunc usesTypealiasInMixedUses(x:Int.TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
83
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInMixedUses' here; 'MixedUses' was not imported by this file}}
84
+
internalfunc usesTypealiasInMixedUses_Internal(x:Int.TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
85
+
86
+
//--- extensions.swift
87
+
88
+
import Swift // Just here to anchor the fix-its
89
+
// expected-note 2 {{add import of module 'InternalUsesOnly'}}{{1-1=internal import InternalUsesOnly\n}}
90
+
// expected-note@-1 {{add import of module 'PackageUsesOnly'}}{{1-1=package import PackageUsesOnly\n}}
91
+
// expected-note@-2 {{add import of module 'PublicUsesOnly'}}{{1-1=public import PublicUsesOnly\n}}
92
+
// expected-note@-3 2 {{add import of module 'MixedUses'}}{{1-1=public import MixedUses\n}}
93
+
94
+
extensionInt.NestedInInternalUsesOnly{ // expected-error {{struct 'NestedInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
95
+
privatefunc privateMethod(){}
96
+
}
97
+
98
+
extensionInt.NestedInInternalUsesOnly{ // expected-error {{struct 'NestedInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
99
+
internalfunc internalMethod(){}
100
+
}
101
+
102
+
extensionInt.NestedInPackageUsesOnly{ // expected-error {{struct 'NestedInPackageUsesOnly' is not available due to missing import of defining module 'PackageUsesOnly'}}
103
+
packagefunc packageMethod(){}
104
+
}
105
+
106
+
extensionInt.NestedInPublicUsesOnly{ // expected-error {{struct 'NestedInPublicUsesOnly' is not available due to missing import of defining module 'PublicUsesOnly'}}
107
+
// expected-warning@-1 {{cannot use struct 'NestedInPublicUsesOnly' in an extension with public or '@usableFromInline' members; 'PublicUsesOnly' was not imported by this file}}
108
+
publicfunc publicMethod(){}
109
+
}
110
+
111
+
extensionInt.NestedInMixedUses{ // expected-error {{struct 'NestedInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
112
+
// expected-warning@-1 {{cannot use struct 'NestedInMixedUses' in an extension with public or '@usableFromInline' members; 'MixedUses' was not imported by this file}}
113
+
publicfunc publicMethod(){}
114
+
}
115
+
116
+
extensionInt.NestedInMixedUses{ // expected-error {{struct 'NestedInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
0 commit comments