diff --git a/runtime/interpreter/value.go b/runtime/interpreter/value.go index 155ea1594e..3fa7c2a821 100644 --- a/runtime/interpreter/value.go +++ b/runtime/interpreter/value.go @@ -17141,7 +17141,7 @@ func (v *CompositeValue) ConformsToStaticType( // InclusiveRange is non-covariant. // For e.g. we disallow assigning InclusiveRange to an InclusiveRange. // Hence we do an exact equality check instead of a sub-type check. - if fieldStaticType != expectedMemberStaticType { + if !fieldStaticType.Equal(expectedMemberStaticType) { return false }