diff options
-rw-r--r-- | compiler/pragmas.nim | 1 | ||||
-rw-r--r-- | tests/pragmas/thintoff.nim | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 38d17eb62..dc09d8fc4 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -277,6 +277,7 @@ proc processDynLib(c: PContext, n: PNode, sym: PSym) = proc processNote(c: PContext, n: PNode) = if (n.kind == nkExprColonExpr) and (sonsLen(n) == 2) and (n.sons[0].kind == nkBracketExpr) and + (n.sons[0].sons.len == 2) and (n.sons[0].sons[1].kind == nkIdent) and (n.sons[0].sons[0].kind == nkIdent): #and (n.sons[1].kind == nkIdent): diff --git a/tests/pragmas/thintoff.nim b/tests/pragmas/thintoff.nim new file mode 100644 index 000000000..7a5b344e6 --- /dev/null +++ b/tests/pragmas/thintoff.nim @@ -0,0 +1,6 @@ +# issue #4001 +discard """ + errormsg: "invalid pragma: hint[]: off" +""" + +{. hint[]: off .} |