mirror of
https://github.com/irmen/prog8.git
synced 2025-10-25 05:18:38 +00:00
default 0 for long type
This commit is contained in:
@@ -427,6 +427,7 @@ fun defaultZero(dt: BaseDataType, position: Position) = when(dt) {
|
||||
BaseDataType.BYTE -> NumericLiteral(BaseDataType.BYTE, 0.0, position)
|
||||
BaseDataType.UWORD, BaseDataType.STR -> NumericLiteral(BaseDataType.UWORD, 0.0, position)
|
||||
BaseDataType.WORD -> NumericLiteral(BaseDataType.WORD, 0.0, position)
|
||||
BaseDataType.LONG -> NumericLiteral(BaseDataType.LONG, 0.0, position)
|
||||
BaseDataType.FLOAT -> NumericLiteral(BaseDataType.FLOAT, 0.0, position)
|
||||
BaseDataType.POINTER -> NumericLiteral(BaseDataType.UWORD, 0.0, position)
|
||||
else -> throw FatalAstException("can only determine default zero value for a numeric type")
|
||||
|
||||
Reference in New Issue
Block a user