mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #12539, refs #21636 `evalInclude` now uses `getPIdent` to check if a symbol isn't `/` anymore instead of assuming it's an ident, which it's not when used in templates. Also it just checks if the symbol is `as` now, because there are other infix operators that could be used like `/../`. It also works with prefix operators now by copying what was done in #21636.
6 lines
146 B
Nim
6 lines
146 B
Nim
# issue #12539
|
|
|
|
template includePath(n: untyped) = include ../modules/n # But `include n` works
|
|
includePath(mincludetemplate)
|
|
doAssert foo == 123
|