Better compiler errors for accessing undeclared fields, calling undeclared
procedures and procedure fields.
This commit is contained in:
Dominik Picheta 2015-06-04 13:55:48 +01:00
commit 22f6017ab8
7 changed files with 22 additions and 10 deletions

View file

@ -1,6 +1,6 @@
discard """
line: 7
errormsg: "undeclared identifier: 'items'"
errormsg: "attempting to call undeclared procedure: 'items'"
"""
type a = enum b,c,d

View file

@ -1,7 +1,7 @@
discard """
file: "tissue710.nim"
line: 8
errorMsg: "undeclared identifier: '||'"
errorMsg: "attempting to call undeclared procedure: '||'"
"""
var sum = 0
for x in 3..1000:

View file

@ -1,7 +1,7 @@
discard """
file: "tnoop.nim"
line: 11
errormsg: "undeclared identifier: 'a'"
errormsg: "attempting to call undeclared procedure: 'a'"
"""

View file

@ -1,16 +1,16 @@
discard """
file: "topaque.nim"
line: 16
errormsg: "undeclared identifier: \'buffer\'"
errormsg: "undeclared field: \'buffer\'"
"""
# Test the new opaque types
import
import
mopaque
var
L: TLexer
L.filename = "ha"
L.line = 34
L.buffer[0] = '\0' #ERROR_MSG undeclared field: 'buffer'

View file

@ -1,7 +1,7 @@
discard """
file: "twrongtupleaccess.nim"
line: 9
errormsg: "undeclared identifier: \'setBLAH\'"
errormsg: "attempting to call undeclared procedure field: \'setBLAH\'"
"""
# Bugfix