mirror of
https://github.com/irmen/prog8.git
synced 2026-10-22 05:02:58 +00:00
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:
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)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user