Files
Nim/tests/errmsgs/t10734.nim
Saem Ghani 260a5dacb7 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>
2021-02-15 09:51:05 +01:00

20 lines
620 B
Nim

discard """
cmd: "nim check $file"
errormsg: ""
nimout: '''
t10734.nim(19, 1) Error: invalid indentation
t10734.nim(19, 6) Error: invalid indentation
t10734.nim(20, 7) Error: expression expected, but found '[EOF]'
t10734.nim(18, 5) Error: 'proc' is not a concrete type; for a callback without parameters use 'proc()'
t10734.nim(19, 6) Error: undeclared identifier: 'p'
t10734.nim(19, 6) Error: expression 'p' has no type (or is ambiguous)
t10734.nim(19, 6) Error: 'p' cannot be assigned to
t10734.nim(17, 3) Hint: 'T' is declared but not used [XDeclaredButNotUsed]
'''
"""
type
T = object
a:
proc p =
case