mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Fix a refinement + union types bug
This commit is contained in:
parent
188f8ad965
commit
6cb3231845
12 changed files with 144 additions and 101 deletions
|
@ -824,7 +824,7 @@ impl Context {
|
|||
self.level,
|
||||
);
|
||||
for sup in super_classes.into_iter() {
|
||||
let sup_ctx = self
|
||||
let (_, sup_ctx) = self
|
||||
.get_nominal_type_ctx(&sup)
|
||||
.unwrap_or_else(|| todo!("{sup} not found"));
|
||||
ctx.register_superclass(sup, sup_ctx);
|
||||
|
@ -942,7 +942,7 @@ impl Context {
|
|||
}
|
||||
}
|
||||
for sup in super_classes.into_iter() {
|
||||
let sup_ctx = self.get_nominal_type_ctx(&sup).unwrap();
|
||||
let (_, sup_ctx) = self.get_nominal_type_ctx(&sup).unwrap();
|
||||
ctx.register_supertrait(sup, sup_ctx);
|
||||
}
|
||||
self.register_gen_mono_type(ident, gen, ctx, Const);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue