mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
* 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
(cherry picked from commit eec1543baf)
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user