fixes #21281; proc f(x: static[auto]) doesn't treat x as static (#25543)

fixes #21281

(cherry picked from commit 74499e4561)
This commit is contained in:
ringabout
2026-02-26 02:09:24 +08:00
committed by narimiran
parent 8ccba2dc86
commit dc1064da23
2 changed files with 22 additions and 1 deletions

13
tests/vm/t21281.nim Normal file
View File

@@ -0,0 +1,13 @@
discard """
nimout: '''
3
3
'''
"""
proc f(x: static[auto]) = # doesn't work
static: echo x
proc g[T](x: static[T]) = # works
static: echo x
f(3)
g(3)