oridb / mc

Myrddin Compiler
MIT License
389 stars 33 forks source link

Compiler crash: Impossible return from classify_recursive #206

Open typeless opened 2 years ago

typeless commented 2 years ago

A reproducer:

type foo = struct
    s : void
;;

const bar = {a : foo;}

const main = {
    var s : foo
    bar(s)
}

Output:

$  mbld -R a.myr
Impossible return from classify_recursive
CRASH: 6m a.myr

Edit: After some experiments and simplifications, the cause became a little bit obvious. I'll send a patch if the fix is not too hard.