We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c160774 commit e855440Copy full SHA for e855440
1 file changed
src/rty/subtyping.rs
@@ -71,8 +71,7 @@ where
71
(Type::Int, Type::Int)
72
| (Type::Bool, Type::Bool)
73
| (Type::String, Type::String)
74
- | (Type::Never, Type::Never)
75
- | (Type::Param(_), Type::Param(_)) => {}
+ | (Type::Never, Type::Never) => {}
76
(Type::Enum(got), Type::Enum(expected)) if got.symbol() == expected.symbol() => {
77
for (got_ty, expected_ty) in got.args.iter().zip(expected.args.iter()) {
78
let cs = self.relate_sub_refined_type(got_ty, expected_ty);
@@ -121,6 +120,7 @@ where
121
120
let cs2 = self.relate_sub_refined_type(&got.elem, &expected.elem);
122
clauses.extend(cs2);
123
}
+ (Type::Param(got), Type::Param(expected)) if got.idx == expected.idx => {}
124
_ => panic!(
125
"inconsistent types: got={}, expected={}",
126
got.display(),
0 commit comments