Use variable instead of type

This commit is contained in:
Ayaz Hafiz 2022-11-09 11:31:14 -06:00
parent d416b8b184
commit 721c4cb1e6
No known key found for this signature in database
GPG Key ID: 0E2A37416A25EF58

View File

@ -435,9 +435,7 @@ pub fn constrain_pattern(
} in destructs
{
let pat_type = Type::Variable(*var);
let pat_type_index =
// TODO(types-soa) use variable here instead
{ let typ = types.from_old_type(&pat_type.clone()); constraints.push_type(types, typ) };
let pat_type_index = constraints.push_variable(*var);
let expected =
constraints.push_pat_expected_type(PExpected::NoExpectation(pat_type_index));