-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
external-crates/move/crates/move-compiler/tests/move_2024/ide_mode/on_dot_autocomplete.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
warning[W10007]: issue with attribute value | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:1:9 | ||
│ | ||
1 │ #[allow(ide_path_autocomplete)] | ||
│ ^^^^^^^^^^^^^^^^^^^^^ Unknown warning filter 'ide_path_autocomplete' | ||
|
||
error[E04023]: invalid method call | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:9 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^^^^^^^^^ | ||
│ │ │ | ||
│ │ No local 'use fun' alias was found for 'a::m::A.b', and no function 'b' was found in the defining module 'a::m' | ||
│ Invalid method call. No known method 'b' on type 'a::m::A' | ||
|
Empty file.
105 changes: 105 additions & 0 deletions
105
...nal-crates/move/crates/move-compiler/tests/move_2024/ide_mode/on_dot_autocomplete.ide.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:21:10 | ||
│ | ||
21 │ c.b.a; // two dots that should trigger auto-completion | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:21:11 | ||
│ | ||
21 │ c.b.a; // two dots that should trigger auto-completion | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:21:12 | ||
│ | ||
21 │ c.b.a; // two dots that should trigger auto-completion | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:21:13 | ||
│ | ||
21 │ c.b.a; // two dots that should trigger auto-completion | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:10 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:11 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:12 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:13 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:14 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^ Possible dot names: 'a::m::bar' or 'x' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:22:15 | ||
│ | ||
22 │ c.b.a.bar(); // resolved method name | ||
│ ^^^ Possible dot names: 'a::m::bar' or 'x' | ||
|
||
error[E04023]: invalid method call | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:9 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^^^^^^^^^ | ||
│ │ │ | ||
│ │ No local 'use fun' alias was found for 'a::m::A.b', and no function 'b' was found in the defining module 'a::m' | ||
│ Invalid method call. No known method 'b' on type 'a::m::A' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:10 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:11 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'b' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:12 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:13 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'a' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:14 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'a::m::bar' or 'x' | ||
|
||
note[I15001]: IDE dot autocomplete | ||
┌─ tests/move_2024/ide_mode/on_dot_autocomplete.move:23:15 | ||
│ | ||
23 │ c.b.a.b(); // unresolved method name | ||
│ ^ Possible dot names: 'a::m::bar' or 'x' | ||
|
25 changes: 25 additions & 0 deletions
25
external-crates/move/crates/move-compiler/tests/move_2024/ide_mode/on_dot_autocomplete.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[allow(ide_path_autocomplete)] | ||
module a::m { | ||
|
||
public struct A has copy, drop { | ||
x: u64 | ||
} | ||
|
||
public struct B has copy, drop { | ||
a: A | ||
} | ||
|
||
public struct C has copy, drop { | ||
b: B | ||
} | ||
|
||
public fun bar(_a: A) {} | ||
|
||
public fun foo() { | ||
let b = B { a: A { x: 0 } }; | ||
let c = C { b: b }; | ||
c.b.a; // two dots that should trigger auto-completion | ||
c.b.a.bar(); // resolved method name | ||
c.b.a.b(); // unresolved method name | ||
} | ||
} |