Open crusso opened 1 year ago
Whittled down to:
actor {
let c = class() { // Suspect class
};
};
[nix-shell:~/motoko/test/run-drun]$ moc issue-4210.mo
Ill-typed intermediate code after Desugaring (use -v to see dumped IR):
issue-4210.mo:3.11-4.4: IR type error [M0000], subtype violation:
()
() -> anon-class-3.11
Raised at Ir_def__Check_ir.error.(fun) in file "ir_def/check_ir.ml", line 95, characters 30-92
Called from Ir_def__Check_ir.check_exp.(<:) in file "ir_def/check_ir.ml" (inlined), line 369, characters 6-32
Called from Ir_def__Check_ir.check_exp in file "ir_def/check_ir.ml", line 705, characters 4-17
Called from Ir_def__Check_ir.check_dec in file "ir_def/check_ir.ml", line 1100, characters 4-21
Called from Stdlib__list.iter in file "list.ml", line 110, characters 12-15
Called from Ir_def__Check_ir.check_comp_unit in file "ir_def/check_ir.ml", line 1159, characters 4-23
Called from Ir_def__Check_ir.check_prog in file "ir_def/check_ir.ml", line 1178, characters 6-28
Thanks for chasing this down! 🎉
Tentative repro extracted from:
https://github.com/sardariuss/MotokoStableBTree/pull/4/files#diff-cf7292a6830f875cef1c27b6375d4e4ce3575115ac20a60cbecf68426206d030R67
crashes the compiler.