This commit is contained in:
Araq
2015-04-24 16:29:20 +02:00
parent 47271b094c
commit 4d20aafb5e
2 changed files with 13 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ proc semFieldAccess(c: PContext, n: PNode, flags: TExprFlags = {}): PNode
proc semOperand(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
# same as 'semExprWithType' but doesn't check for proc vars
result = semExpr(c, n, flags + {efOperand})
if result.kind == nkEmpty:
if result.kind == nkEmpty and result.typ.isNil:
# do not produce another redundant error message:
#raiseRecoverableError("")
result = errorNode(c, n)

View File

@@ -0,0 +1,12 @@
discard """
errormsg: "type mismatch"
line: 11
"""
# bug #2372
macro foo(dummy: int): stmt =
discard
proc takeStr(s: string) = echo s
takeStr foo(12)