mc
mc copied to clipboard
Calling a generic function in an impl definition crashes the compiler
This seems to happen only when the caller of the trait, the trait definition and the impl definition are all in different modules.
Here is a repro https://github.com/typeless/myr-bug/blob/main/c.myr#L12
$ mbld
6m -O obj -I obj -I obj a.myr
Missing decl f
CRASH: 6m -O obj -I obj -I obj a.myr
Update: My description of the issue was inaccurate. It seems to be that
- A pkg
Amakes calls to a generic functiongdefined in pkgB. The generic functiongmakes calls to a internal functionfdefined in the same pkgB. - When the generic function
gis imported into the pkgA, it's expanded in the pkgA. But in the instantiatedginA, it cannot see the functionfdefined internally inB.