diff --git a/src/tests/exprtype/exprtype_test.go b/src/tests/exprtype/exprtype_test.go index 16aaef9a..47bd564b 100644 --- a/src/tests/exprtype/exprtype_test.go +++ b/src/tests/exprtype/exprtype_test.go @@ -2201,72 +2201,44 @@ function f() { runExprTypeTest(t, &exprTypeTestParams{code: code}) } -func TestArrayTypesWithUnpack_Primitives(t *testing.T) { +func TestArrayTypesWithUnpackPrimitives(t *testing.T) { code := `= WMax +} + func FormatType(s string) (res string) { - if s == "" || s[0] >= WMax { + if IsAfterWMaxed(s) { return FormatSimpleType(s) } diff --git a/src/types/map.go b/src/types/map.go index c25c0487..e7ba6957 100644 --- a/src/types/map.go +++ b/src/types/map.go @@ -411,7 +411,7 @@ func (m Map) LazyArrayElemType() Map { mm := make(map[string]struct{}, m.Len()) for typ := range m.m { // TODO: https://github.com/VKCOM/noverify/issues/1227 - if typ == "null" { + if IsAfterWMaxed(typ) { break }