require errormsg to be specified before file.
This commit is contained in:
parent
ca394ebd95
commit
1105d03644
264 changed files with 305 additions and 623 deletions
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
discard """
|
||||
errormsg: "type mismatch: got <int>"
|
||||
file: "tconverter_with_constraint.nim"
|
||||
line: 20
|
||||
errormsg: "type mismatch: got <int>"
|
||||
"""
|
||||
|
||||
type
|
||||
|
|
@ -10,11 +10,11 @@ type
|
|||
|
||||
converter to_mytype(m: int{lit}): MyType =
|
||||
m.MyType
|
||||
|
||||
|
||||
proc myproc(m: MyType) =
|
||||
echo m.int, ".MyType"
|
||||
|
||||
myproc(1) # call by literal is ok
|
||||
myproc(1) # call by literal is ok
|
||||
|
||||
var x: int = 12
|
||||
myproc(x) # should fail
|
||||
myproc(x) # should fail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue