fix: type instantiation bug

This commit is contained in:
Shunsuke Shibayama 2025-02-21 18:02:22 +09:00
parent 7c75ba0044
commit dfb2e43345
2 changed files with 8 additions and 1 deletions

View file

@ -792,7 +792,9 @@ impl Context {
let obj = match res_obj {
Ok(obj) => obj,
Err((obj, es)) => {
if is_method {
errs.extend(es);
}
obj
}
};

View file

@ -16,3 +16,8 @@ _, _ = f2, g2
Packages = [{ .name = Str; .version = Str }; _]
_: Packages = [{ .name = "a"; .version = "1.0.0" }]
_: Packages = [{ .name = "a"; .version = "1.0.0" }, { .name = "b"; .version = "1.0.0" }]
C = Class {
.foo = global::List(Int)
}
_ = C.new { .foo = [] }