Expand hoisted default params in sem (#15270)
* Expand hoisted default params in sem
Introduce ast.newTree{I,IT}
Add test for default params in procs
* Cleanup
* Simplify hoist transformation and expand test
This commit is contained in:
parent
70d6238756
commit
35ff17410f
12 changed files with 178 additions and 123 deletions
|
|
@ -19,8 +19,7 @@ proc opSlurp*(file: string, info: TLineInfo, module: PSym; conf: ConfigRef): str
|
|||
# we produce a fake include statement for every slurped filename, so that
|
||||
# the module dependencies are accurate:
|
||||
discard conf.fileInfoIdx(AbsoluteFile filename)
|
||||
appendToModule(module, newNode(nkIncludeStmt, info, @[
|
||||
newStrNode(nkStrLit, filename)]))
|
||||
appendToModule(module, newTreeI(nkIncludeStmt, info, newStrNode(nkStrLit, filename)))
|
||||
except IOError:
|
||||
localError(conf, info, "cannot open file: " & file)
|
||||
result = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue