Skip to content

Commit 30f81ad

Browse files
authored
Update GoStructType.java
1 parent 2d3609b commit 30f81ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go-lisa/src/main/java/it/unive/golisa/cfg/type/composite/GoStructType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public Expression defaultValue(CFG cfg, CodeLocation location) {
208208
if (key.getStaticType() instanceof ReferenceType)
209209
values[i++] = new GoUnknown(cfg, location);
210210
else
211-
values[i++] = key.getStaticType().defaultValue(cfg, location);
211+
values[i++] = key.getStaticType().defaultValue(cfg, location) == null ? new GoUnknown(cfg, location) : key.getStaticType().defaultValue(cfg, location);
212212

213213
return new GoNonKeyedLiteral(cfg, location, values, this);
214214
}

0 commit comments

Comments
 (0)