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:
|
||||
#registerPass(rodwrite.rodwritePass())
|
||||
discard CompileModule(options.libpath / "system", {sfSystemModule})
|
||||
# I'm lazy and misused this piece of code as a testcase so don't remove
|
||||
# the invocation with a named parameter:
|
||||
service.serve(action = proc () =
|
||||
service.serve(proc () =
|
||||
let projectFile = mainCommandArg()
|
||||
discard CompileModule(projectFile, {sfMainModule})
|
||||
)
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ proc semLambda(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
|||
if sfImportc in s.flags:
|
||||
LocalError(n.sons[bodyPos].info, errImplOfXNotAllowed, s.name.s)
|
||||
#if efDetermineType notin flags:
|
||||
# XXX not good enough
|
||||
# XXX not good enough; see tnamedparamanonproc.nim
|
||||
pushProcCon(c, s)
|
||||
addResult(c, s.typ.sons[0], n.info, skProc)
|
||||
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