File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -716,7 +716,9 @@ class Resolver(
716
716
* There are three options here:
717
717
* * it successfully constructs a type suitable with defaultType and returns it;
718
718
* * it constructs a type that cannot be assigned in a variable with the [defaultType] and we `touched`
719
- * the [addr] during the analysis. In such case the method returns [defaultType] as a result;
719
+ * the [addr] during the analysis. In such case the method returns [defaultType] as a result
720
+ * if the constructed type is not an array, and in case of array it returns the [defaultType] if it has the same
721
+ * dimensions as the constructed type and its ancestors includes the constructed type, or null otherwise;
720
722
* * it constructs a type that cannot be assigned in a variable with the [defaultType] and we did **not** `touched`
721
723
* the [addr] during the analysis. It means we can create [UtNullModel] to represent such element. In such case
722
724
* the method returns null as the result.
@@ -811,6 +813,10 @@ class Resolver(
811
813
// as const or store model.
812
814
if (defaultBaseType is PrimType ) return null
813
815
816
+ if (actualType.numDimensions == 0 ) {
817
+ return defaultType
818
+ }
819
+
814
820
val actualBaseType = actualType.baseType
815
821
816
822
require(actualBaseType is RefType ) { " Expected RefType, but $actualBaseType found" }
You can’t perform that action at this time.
0 commit comments