From 8df655a0ce43575207f8ec8a471168183a8953ca Mon Sep 17 00:00:00 2001 From: Richardas Kuchinskas Date: Wed, 24 Jul 2024 20:43:10 +0300 Subject: [PATCH] 1000iq fix --- src/tests/exprtype/exprtype_test.go | 72 +++++++++-------------------- src/types/lazy.go | 6 ++- src/types/map.go | 2 +- 3 files changed, 28 insertions(+), 52 deletions(-) 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 }