forked from nim-lang/Nim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't provide suggestions for enum fields (nim-lang#22959)
Currently the suggestions create a lot of noise when creating enum fields. I don't see any way of a macro creating fields (when called inside an enum) so it should be safe to not show suggestions --------- Co-authored-by: Andreas Rumpf <[email protected]>
- Loading branch information
1 parent
02be027
commit 81c0513
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
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
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,17 @@ | ||
discard """ | ||
$nimsuggest --tester $file | ||
>sug $1 | ||
>sug $2 | ||
sug;;skConst;;tenum_field.BarFoo;;int literal(1);;$file;;10;;6;;"";;100;;Prefix | ||
""" | ||
|
||
proc something() = discard | ||
|
||
const BarFoo = 1 | ||
|
||
type | ||
Foo = enum | ||
# Test that typing the name doesn't give suggestions | ||
somethi#[!]# | ||
# Test that the right hand side still gets suggestions | ||
another = BarFo#[!]# |