diff options
Diffstat (limited to 'tests/errmsgs')
-rw-r--r-- | tests/errmsgs/tdetailed_position.nim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/errmsgs/tdetailed_position.nim b/tests/errmsgs/tdetailed_position.nim new file mode 100644 index 000000000..d6db94c3e --- /dev/null +++ b/tests/errmsgs/tdetailed_position.nim @@ -0,0 +1,22 @@ + +discard """ +cmd: "nim check $file" +errormsg: "type mismatch: got (int literal(1), int literal(2), int literal(3))" +nimout: ''' +but expected one of: +proc main(a, b, c: string) +first type mismatch at position: 1 +required type: string +but expression '1' is of type: int literal(1) + +expression: main(1, 2, 3) +''' +""" + +const + myconst = "abcdefghijklmnopqrstuvwxyz" + +proc main(a, b, c: string) {.deprecated: "use foo " & "instead " & myconst.} = + return + +main(1, 2, 3) |