Fix offset location for 'SingleConstructorExpect' warnings.

This commit is contained in:
KtorZ
2023-02-17 16:43:07 +01:00
parent 92021e00b4
commit 76b2396830

View File

@@ -981,7 +981,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
.push(Warning::SingleConstructorExpect {
location: Span {
start: location.start,
end: kind.location_offset(),
end: location.start + kind.location_offset(),
},
pattern_location: dbg!(untyped_pattern.location()),
value_location: dbg!(untyped_value.location()),