* fix semcase on tySequence and tyObject #20283 #19682 * use better arg name * avoiding returns nil use errorNode instead, clean code * use efNoDiagnostics flag * remove tests/errmsgs/t19682.nim * combine 2 test cases to one file
This commit is contained in:
parent
6166b796ba
commit
eec1543baf
4 changed files with 41 additions and 8 deletions
29
tests/errmsgs/tcase_stmt.nim
Normal file
29
tests/errmsgs/tcase_stmt.nim
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
discard """
|
||||
cmd: "nim check --hints:off $file"
|
||||
errormsg: ""
|
||||
nimout: '''
|
||||
tcase_stmt.nim(22, 7) Error: selector must be of an ordinal type, float or string
|
||||
tcase_stmt.nim(28, 6) Error: selector must be of an ordinal type, float or string
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
|
||||
# bug #19682
|
||||
type A = object
|
||||
|
||||
case A()
|
||||
else:
|
||||
discard
|
||||
|
||||
# bug #20283
|
||||
|
||||
case @[]
|
||||
else: discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue