OOPS! You've triggered a compiler bug. compile result

Stderr:
OOPS! You’ve triggered a compiler bug.
Please report this at https://github.com/dfinity/motoko/issues/new with the following details:

Motoko (source dphsbbg2-hx7ajr94-7j7higa7-v6hfzw6m)

Fatal error: exception Lib.Promise.Promise
Raised at Lib.Promise.fulfill in file “lib/lib.ml”, line 456, characters 55-68
Called from Lib.Promise.lazy_value in file “lib/lib.ml”, line 461, characters 34-50
Called from Codegen__Compile.StackRep.adjust in file “codegen/compile.ml”, line 5316, characters 48-75
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7566, characters 14-46
Called from Stdlib__list.map in file “list.ml”, line 92, characters 20-23
Called from Codegen__InstrList.concat_map in file “codegen/instrList.ml” (inlined), line 135, characters 43-58
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6866, characters 6-50
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6812, characters 10-61
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.FuncDec.compile_local_function.(fun) in file “codegen/compile.ml”, line 5583, characters 20-37
Called from Codegen__Compile.Func.of_body in file “codegen/compile.ml”, line 685, characters 6-18
Called from CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 36, characters 4-11
Called from Lib.AllocOnUse.use in file “lib/lib.ml”, line 514, characters 13-28
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6813, characters 24-34
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6848, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6849, characters 6-36
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.FuncDec.compile_local_function.(fun) in file “codegen/compile.ml”, line 5583, characters 20-37
Called from Codegen__Compile.Func.of_body in file “codegen/compile.ml”, line 685, characters 6-18
Called from CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 36, characters 4-11
Called from Lib.AllocOnUse.use in file “lib/lib.ml”, line 514, characters 13-28
Called from Codegen__Compile.StackRep.materialize_const_v in file “codegen/compile.ml”, line 5283, characters 53-64
Called from Lib.Promise.lazy_value in file “lib/lib.ml”, line 461, characters 44-50
Called from Codegen__Compile.StackRep.adjust in file “codegen/compile.ml”, line 5316, characters 48-75
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7566, characters 14-46
Called from Stdlib__list.map in file “list.ml”, line 92, characters 20-23
Called from Codegen__InstrList.concat_map in file “codegen/instrList.ml” (inlined), line 135, characters 43-58
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6866, characters 6-50
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.compile_exp in file “codegen/compile.ml”, line 6812, characters 10-61
Called from Codegen__Compile.compile_exp_as in file “codegen/compile.ml”, line 7565, characters 24-44
Called from Codegen__Compile.FuncDec.compile_local_function.(fun) in file “codegen/compile.ml”, line 5583, characters 20-37
Called from Codegen__Compile.Func.of_body in file “codegen/compile.ml”, line 685, characters 6-18
Called from CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 36, characters 4-11
Called from Lib.AllocOnUse.def in file “lib/lib.ml”, line 499, characters 13-28
Called from Codegen__Compile.compile_dec.(fun) in file “codegen/compile.ml”, line 7833, characters 39-50
Called from Codegen__Compile.compile_dec.(fun) in file “codegen/compile.ml”, line 7818, characters 30-42
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.go.(fun) in file “codegen/compile.ml”, line 7866, characters 44-62
Called from Codegen__Compile.compile_decs_public.(fun) in file “codegen/compile.ml”, line 7869, characters 39-61
Called from Codegen__Compile.main_actor.(fun) in file “codegen/compile.ml”, line 8064, characters 4-21
Called from Codegen__Compile.Func.of_body in file “codegen/compile.ml”, line 685, characters 6-18
Called from CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 31, characters 17-27
Re-raised at CamlinternalLazy.force_lazy_block in file “camlinternalLazy.ml”, line 36, characters 4-11
Called from Lib.AllocOnUse.use in file “lib/lib.ml”, line 514, characters 13-28
Called from Codegen__Compile.E.built_in in file “codegen/compile.ml” (inlined), line 401, characters 4-49
Called from Codegen__Compile.IC.export_init.(fun) in file “codegen/compile.ml”, line 3453, characters 20-43
Called from Codegen__Compile.Func.of_body in file “codegen/compile.ml”, line 685, characters 6-18
Called from Codegen__Compile.IC.export_init in file “codegen/compile.ml”, line 3450, characters 18-227
Called from Codegen__Compile.compile in file “codegen/compile.ml”, line 8167, characters 6-24
Called from Pipeline.compile_files in file “pipeline/pipeline.ml”, line 647, characters 14-53
Called from Diag.bind in file “lang_utils/diag.ml”, line 32, characters 27-30
Called from Diag.bind in file “lang_utils/diag.ml”, line 32, characters 27-30
Called from Moc.process_files in file “exes/moc.ml”, line 148, characters 37-82
Called from Moc in file “exes/moc.ml”, line 210, characters 4-23

Hmm, that reminds me of a bug we fixed a while ago. Also, your version of moc doesn’t report its version, which may mean it’s not the latest version. Is this the latest version of Motoko?

@goose did you report it at https://github.com/dfinity/motoko/issues/new like the message says?