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
Sema: Look through missing imports during unqualified type lookup.
To improve knock-on diagnostics, resolve unqualified types to their matching
member type declarations regardless of whether an import is missing when the
`MemberImportVisibility` features is enabled.
Part of rdar://126637855.
Copy file name to clipboardExpand all lines: test/NameLookup/members_transitive_multifile_access_level.swift
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -47,19 +47,20 @@ func internalFunc(_ x: Int) {
47
47
48
48
//--- function_signatures.swift
49
49
50
-
// FIXME: The access level is wrong on many of these fix-its.
51
50
import Swift // Just here to anchor the fix-its
52
51
// 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}}
52
+
// expected-note@-1 {{add import of module 'PackageUsesOnly'}}{{1-1=package import PackageUsesOnly\n}}
53
+
// expected-note@-2 {{add import of module 'PublicUsesOnly'}}{{1-1=public import PublicUsesOnly\n}}
54
+
// expected-note@-3 2 {{add import of module 'MixedUses'}}{{1-1=public import MixedUses\n}}
56
55
57
56
extensionInt{
58
57
privatefunc usesTypealiasInInternalUsesOnly_Private(x:TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
59
58
internalfunc usesTypealiasInInternalUsesOnly(x:TypealiasInInternalUsesOnly){} // expected-error {{type alias 'TypealiasInInternalUsesOnly' is not available due to missing import of defining module 'InternalUsesOnly'}}
60
59
packagefunc usesTypealiasInPackageUsesOnly(x:TypealiasInPackageUsesOnly){} // expected-error {{type alias 'TypealiasInPackageUsesOnly' is not available due to missing import of defining module 'PackageUsesOnly'}}
61
60
publicfunc usesTypealiasInPublicUsesOnly(x:TypealiasInPublicUsesOnly){} // expected-error {{type alias 'TypealiasInPublicUsesOnly' is not available due to missing import of defining module 'PublicUsesOnly'}}
61
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInPublicUsesOnly' here; 'PublicUsesOnly' was not imported by this file}}
62
62
publicfunc usesTypealiasInMixedUses(x:TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
63
+
// expected-warning@-1 {{cannot use type alias 'TypealiasInMixedUses' here; 'MixedUses' was not imported by this file}}
63
64
internalfunc usesTypealiasInMixedUses_Internal(x:TypealiasInMixedUses){} // expected-error {{type alias 'TypealiasInMixedUses' is not available due to missing import of defining module 'MixedUses'}}
0 commit comments