diff options
author | Jake Leahy <jake@leahy.dev> | 2023-11-21 07:12:54 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 21:12:54 +0100 |
commit | 81c051364426fdfa4310da7692d1d99600e51d8b (patch) | |
tree | 1850248483ae313407418bacc185e8ec47304d48 /nimsuggest/tests | |
parent | 02be027e9b3c146c0a594c3ea4fae7152fd8b974 (diff) | |
download | Nim-81c051364426fdfa4310da7692d1d99600e51d8b.tar.gz |
Don't provide suggestions for enum fields (#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 <rumpf_a@web.de>
Diffstat (limited to 'nimsuggest/tests')
-rw-r--r-- | nimsuggest/tests/tenum_field.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nimsuggest/tests/tenum_field.nim b/nimsuggest/tests/tenum_field.nim new file mode 100644 index 000000000..4ceb3e021 --- /dev/null +++ b/nimsuggest/tests/tenum_field.nim @@ -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#[!]# |