summary refs log tree commit diff stats
path: root/nimsuggest/tests
diff options
context:
space:
mode:
authorSaem Ghani <saemghani+github@gmail.com>2021-02-15 00:51:05 -0800
committerGitHub <noreply@github.com>2021-02-15 09:51:05 +0100
commit260a5dacb7a3854d6d6aa18d9996b88bfcd13cc6 (patch)
tree175b30daf8594641e5f47e0576914e73fd386594 /nimsuggest/tests
parentb68ecc82cb404dbbd291320139955794e88c24ff (diff)
downloadNim-260a5dacb7a3854d6d6aa18d9996b88bfcd13cc6.tar.gz
fixed dot operator recursive loop & macro suggest (#16922)
* basic stability improvements; refs nimsuggest
* fixed dot operator recursive loop & macro suggest
* hacky fix for run away dot operator sem check

Committing this mostly to make the issue more clear. Perhaps get better
feedback.

* semExprWithType seems like a better place to check
* fixed error messages const case expressions
* Clean-up test
* stopped the dot operator madness

No longer get infinite recursion when seming broken code with a dot
operator macro like in jsffi.

Co-authored-by: Araq <rumpf_a@web.de>
Diffstat (limited to 'nimsuggest/tests')
-rw-r--r--nimsuggest/tests/twithin_macro.nim6
-rw-r--r--nimsuggest/tests/twithin_macro_prefix.nim7
2 files changed, 1 insertions, 12 deletions
diff --git a/nimsuggest/tests/twithin_macro.nim b/nimsuggest/tests/twithin_macro.nim
index 2f5e278c4..d79dae1be 100644
--- a/nimsuggest/tests/twithin_macro.nim
+++ b/nimsuggest/tests/twithin_macro.nim
@@ -41,15 +41,11 @@ echo r.age_human_yrs()
 echo r
 
 discard """
-disabled:true
-$nimsuggest --tester $file
+$nimsuggest --tester --maxresults:5 $file
 >sug $1
 sug;;skField;;age;;int;;$file;;6;;6;;"";;100;;None
 sug;;skField;;name;;string;;$file;;5;;6;;"";;100;;None
 sug;;skMethod;;twithin_macro.age_human_yrs;;proc (self: Animal): int;;$file;;8;;9;;"";;100;;None
 sug;;skMethod;;twithin_macro.vocalize;;proc (self: Animal): string;;$file;;7;;9;;"";;100;;None
 sug;;skMethod;;twithin_macro.vocalize;;proc (self: Rabbit): string;;$file;;23;;9;;"";;100;;None
-sug;;skMacro;;twithin_macro.class;;proc (head: untyped, body: untyped): untyped{.gcsafe, locks: <unknown>.};;$file;;4;;6;;"";;50;;None*
 """
-
-# TODO: disabled due to semantic error reporting in nimsuggest results
diff --git a/nimsuggest/tests/twithin_macro_prefix.nim b/nimsuggest/tests/twithin_macro_prefix.nim
index 1c06397c5..dd3810818 100644
--- a/nimsuggest/tests/twithin_macro_prefix.nim
+++ b/nimsuggest/tests/twithin_macro_prefix.nim
@@ -46,10 +46,3 @@ $nimsuggest --tester $file
 sug;;skField;;age;;int;;$file;;6;;6;;"";;100;;Prefix
 sug;;skMethod;;twithin_macro_prefix.age_human_yrs;;proc (self: Animal): int;;$file;;8;;9;;"";;100;;Prefix
 """
-
-#[
-TODO: additional calls to `>sug $1` produces different output with errors,
-      possibly related to cached results from the first analysis, which refers
-      to expanded macros/templates which rely on imported symbols from `system`
-      module that are not present in this module.
-]#