Freshly instantiate nested recursion variables under an opaque type

This commit is contained in:
Ayaz Hafiz 2023-04-12 14:31:19 -05:00
parent 3d6353dbd2
commit d3ab9ab926
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 24 additions and 15 deletions

View file

@ -2316,7 +2316,7 @@ impl Type {
RecursiveTagUnion(rec, tags, ext) => {
if let Some(replacement) = substitutions.get(rec) {
let new_rec_var = match replacement {
Type::Variable(v) => v.clone(),
Type::Variable(v) => *v,
_ => panic!("Recursion var substitution must be a variable"),
};