better support for PROGMEM like annotations for lets/vars; fixes #12216 (#12799)

This commit is contained in:
Andreas Rumpf 2019-12-05 13:45:16 +01:00 • committed by GitHub
commit 0e7338d65c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 129 additions and 81 deletions

View file

@ -0,0 +1,11 @@
discard """
output: "5"
cmd: r"nim c --hints:on $options -d:release $file"
ccodecheck: "'/*PROGMEM*/ myLetVariable = {'"
target: "C"
"""
var myLetVariable {.exportc, codegenDecl: "$# /*PROGMEM*/ $#".} = [1, 2, 3]
myLetVariable[0] = 5
echo myLetVariable[0]