compiler: better error messages (#5613)
This commit is contained in:
parent
481d8ba24a
commit
d02486aa48
8 changed files with 37 additions and 29 deletions
|
|
@ -1,10 +1,10 @@
|
|||
discard """
|
||||
line: 10
|
||||
errormsg: "value of type 'bool' has to be discarded"
|
||||
errormsg: '''expression 'open(f, "arg.txt", fmRead, -1)' is of type 'bool' and has to be discarded'''
|
||||
"""
|
||||
|
||||
proc p =
|
||||
var f: TFile
|
||||
var f: File
|
||||
echo "hi"
|
||||
|
||||
open(f, "arg.txt")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
errormsg: "value of type 'string' has to be discarded"
|
||||
errormsg: '''expression '"invalid"' is of type 'string' and has to be discarded'''
|
||||
line: 12
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue