bootstrapping works again
This commit is contained in:
parent
0d8f45697c
commit
09e4b194f5
3 changed files with 16 additions and 4 deletions
|
|
@ -312,9 +312,7 @@ proc MainCommand =
|
||||||
# no need to write rod files and would slow down things:
|
# no need to write rod files and would slow down things:
|
||||||
#registerPass(rodwrite.rodwritePass())
|
#registerPass(rodwrite.rodwritePass())
|
||||||
discard CompileModule(options.libpath / "system", {sfSystemModule})
|
discard CompileModule(options.libpath / "system", {sfSystemModule})
|
||||||
# I'm lazy and misused this piece of code as a testcase so don't remove
|
service.serve(proc () =
|
||||||
# the invocation with a named parameter:
|
|
||||||
service.serve(action = proc () =
|
|
||||||
let projectFile = mainCommandArg()
|
let projectFile = mainCommandArg()
|
||||||
discard CompileModule(projectFile, {sfMainModule})
|
discard CompileModule(projectFile, {sfMainModule})
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -690,7 +690,7 @@ proc semLambda(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||||
if sfImportc in s.flags:
|
if sfImportc in s.flags:
|
||||||
LocalError(n.sons[bodyPos].info, errImplOfXNotAllowed, s.name.s)
|
LocalError(n.sons[bodyPos].info, errImplOfXNotAllowed, s.name.s)
|
||||||
#if efDetermineType notin flags:
|
#if efDetermineType notin flags:
|
||||||
# XXX not good enough
|
# XXX not good enough; see tnamedparamanonproc.nim
|
||||||
pushProcCon(c, s)
|
pushProcCon(c, s)
|
||||||
addResult(c, s.typ.sons[0], n.info, skProc)
|
addResult(c, s.typ.sons[0], n.info, skProc)
|
||||||
let semBody = hloBody(c, semProcBody(c, n.sons[bodyPos]))
|
let semBody = hloBody(c, semProcBody(c, n.sons[bodyPos]))
|
||||||
|
|
|
||||||
14
tests/compile/tnamedparamanonproc.nim
Normal file
14
tests/compile/tnamedparamanonproc.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
type
|
||||||
|
PButton = ref object
|
||||||
|
TButtonClicked = proc(button: PButton) {.nimcall.}
|
||||||
|
|
||||||
|
proc newButton*(onClick: TButtonClicked) =
|
||||||
|
nil
|
||||||
|
|
||||||
|
proc main() =
|
||||||
|
newButton(onClick = proc(b: PButton) =
|
||||||
|
var requestomat = 12
|
||||||
|
)
|
||||||
|
|
||||||
|
main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue