error message for accidental use of macro (#10490)

* error message for accidental use of macro
This commit is contained in:
Arne Döring 2019-02-19 12:21:42 +01:00 • committed by GitHub
commit 6b9a139f7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,9 @@
discard """
errormsg: "cannot assign macro symbol to constant here"
line: 9
"""
macro m(body: untyped): untyped =
body
const x2 = m