normal error message instead of crash when typed pointer arrays are used as struct field (currently not supported by the compiler)

This commit is contained in:
Irmen de Jong committed 2026-08-24 19:21:30 +02:00
1 parent 296295011e
commit 2bbbacc46e
4 files changed
+27 -9

No files matched your search

@@ -219,6 +219,11 @@ class DataType private constructor(
fun elementToArray(splitwords: Boolean = true): DataType {
return if (base == BaseDataType.UWORD || base == BaseDataType.WORD || base == BaseDataType.STR) arrayFor(base, splitwords)
else if(base.isPointer) {
if(subType!=null) arrayOfPointersTo(subType)
else if(subTypeFromAntlr!=null) arrayOfPointersFromAntlrTo(sub, subTypeFromAntlr)
else arrayOfPointersTo(sub!!)
}
else arrayFor(base, false)
}