Skip to content

Commit 9542eb6

Browse files
committed
[NFC] Improve/correct more module selector tests
1 parent 652eb7d commit 9542eb6

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

test/NameLookup/module_selector.swift

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ struct AvailableUser {
284284
}
285285

286286
func builderUser2(@main::MyBuilder fn: () -> Void) {}
287-
// FIXME should succeed: expected-error@-1 {{unknown attribute 'MyBuilder'}}
287+
// FIXME improve: expected-error@-1 {{unknown attribute 'MyBuilder'}}
288288
289289
func builderUser3(@ModuleSelectorTestingKit::MyBuilder fn: () -> Void) {}
290290
// no-error
@@ -333,16 +333,15 @@ func main::decl1(
333333
// expected-error@-1 {{name of function declaration cannot be qualified with module selector}}
334334
main::p1: main::A,
335335
// expected-error@-1 {{argument label cannot be qualified with module selector}}
336-
// FIXME access path: expected-error@-2 {{type 'A' is not imported through module 'main'}}
337-
// FIXME access path: expected-note@-3 {{did you mean module 'ModuleSelectorTestingKit'?}} {{13-17=ModuleSelectorTestingKit}}
338-
main::label p2: main::A,
336+
// expected-error@-2 {{type 'A' is not imported through module 'main'}}
337+
// expected-note@-3 {{did you mean module 'ModuleSelectorTestingKit'?}} {{13-17=ModuleSelectorTestingKit}}
338+
main::label p2: main::inout A,
339339
// expected-error@-1 {{argument label cannot be qualified with module selector}}
340-
// FIXME access path: expected-error@-2 {{type 'A' is not imported through module 'main'}}
341-
// FIXME access path: expected-note@-3 {{did you mean module 'ModuleSelectorTestingKit'?}} {{19-23=ModuleSelectorTestingKit}}
342-
label main::p3: main::A
340+
// FIXME: expected-error@-2 {{expected identifier in dotted type}} should be something like {{type 'inout' is not imported through module 'main'}}
341+
label main::p3: @main::escaping () -> A
343342
// expected-error@-1 {{name of parameter declaration cannot be qualified with module selector}}
344-
// FIXME access path: expected-error@-2 {{type 'A' is not imported through module 'main'}}
345-
// FIXME access path: expected-note@-3 {{did you mean module 'ModuleSelectorTestingKit'?}} {{19-23=ModuleSelectorTestingKit}}
343+
// FIXME: expected-error@-2 {{attribute can only be applied to declarations, not types}} should be something like {{type 'escaping' is not imported through module 'main'}}
344+
// FIXME: expected-error@-3 {{expected parameter type following ':'}}
346345
) {
347346
let main::decl1a = "a"
348347
// expected-error@-1 {{name of constant declaration cannot be qualified with module selector}}

0 commit comments

Comments
 (0)