mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
bootstrapping works again
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user