diff options
Diffstat (limited to 'nimsuggest/tests/tarrowcrash.nim')
-rw-r--r-- | nimsuggest/tests/tarrowcrash.nim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nimsuggest/tests/tarrowcrash.nim b/nimsuggest/tests/tarrowcrash.nim new file mode 100644 index 000000000..a303e88f5 --- /dev/null +++ b/nimsuggest/tests/tarrowcrash.nim @@ -0,0 +1,20 @@ +# issue #24179 + +import sugar + +type + Parser[T] = object + +proc eatWhile[T](p: Parser[T], predicate: T -> bool): seq[T] = + return @[] + +proc skipWs(p: Parser[char]) = + discard p.eatWhile((c: char) => c == 'a') +#[!]# + +discard """ +$nimsuggest --tester $file +>chk $1 +chk;;skUnknown;;;;Hint;;???;;0;;-1;;">> (toplevel): import(dirty): tests/tarrowcrash.nim [Processing]";;0 +chk;;skUnknown;;;;Hint;;$file;;11;;5;;"\'skipWs\' is declared but not used [XDeclaredButNotUsed]";;0 +""" |