-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
While trying to create a mapping table from strings to internal types for use in a macro I noticed I got weird errors when trying to have NimNodes in a const array:
static:
let testArr = [parseExpr("int"), parseExpr("float")]
const testArr2 = [parseExpr("int"), parseExpr("float")]
echo testArr[0]
echo testArr2[0]
This creates an error "Error: cannot generate VM code for int" for the second echo statement. Removing the echo statement makes it work fine, even with the declaration of the const. The let works fine.