2
0

Fix test failures

Add bool type alias conversion in `elemKindToPointerTypes` and `underlyingNumberType`
This commit is contained in:
Alek Anokhin
2023-05-19 12:36:53 +02:00
committed by Jack Christensen
parent c1c67e4e58
commit 70a200cff4
3 changed files with 5 additions and 0 deletions
+3
View File
@@ -64,6 +64,9 @@ func underlyingNumberType(val any) (any, bool) {
case reflect.String:
convVal := refVal.String()
return convVal, reflect.TypeOf(convVal) != refVal.Type()
case reflect.Bool:
convVal := refVal.Bool()
return convVal, reflect.TypeOf(convVal) != refVal.Type()
}
return nil, false
+1
View File
@@ -666,6 +666,7 @@ var elemKindToPointerTypes map[reflect.Kind]reflect.Type = map[reflect.Kind]refl
reflect.Float32: reflect.TypeOf(new(float32)),
reflect.Float64: reflect.TypeOf(new(float64)),
reflect.String: reflect.TypeOf(new(string)),
reflect.Bool: reflect.TypeOf(new(bool)),
}
type underlyingTypeScanPlan struct {