mirror of
https://github.com/irmen/prog8.git
synced 2025-11-02 13:16:07 +00:00
get rid of invalid ARRAY_STRUCT data type (arrays of struct instance are not yet supported)
This commit is contained in:
@@ -876,7 +876,7 @@ private fun VardeclContext.toAst(type: VarDeclType, value: Expression?): VarDecl
|
||||
if(baseDt.isPointer)
|
||||
DataType.arrayOfPointersFromAntlrTo(baseDt.sub, baseDt.subTypeFromAntlr)
|
||||
else if(baseDt.isStructInstance)
|
||||
DataType.arrayOfStructsFromAntlr(baseDt.subTypeFromAntlr!!)
|
||||
throw SyntaxError("array of structures not allowed (use array of pointers)", toPosition())
|
||||
else
|
||||
DataType.arrayFor(baseDt.base, split!=SplitWish.NOSPLIT)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user