We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee0b957 commit 012d2ccCopy full SHA for 012d2cc
src/compiler/parser-decl-symbtype.bas
@@ -63,10 +63,20 @@ function cConstIntExprRanged _
63
64
r = @range( typeGetSizeType( todtype ) )
65
66
+ if( expr = NULL ) then
67
+ errReport( FB_ERRMSG_EXPECTEDEXPRESSION )
68
+ expr = astNewCONSTi( 0, todtype )
69
+ end if
70
+
71
+ if( astIsCONST( expr ) = FALSE ) then
72
+ errReport( FB_ERRMSG_EXPECTEDCONST )
73
+ astDelTree( expr )
74
+ expr = astNewCONSTi( 0, FB_DATATYPE_LONGINT )
75
76
77
dtype = astGetDataType( expr )
78
- '' cConstIntExpr() will flush expr
- value = cConstIntExpr( expr, FB_DATATYPE_LONGINT )
79
+ value = astConstFlushToInt( expr, FB_DATATYPE_LONGINT )
80
81
if( typeIsSigned( dtype ) ) then
82
if( typeIsSigned( todtype ) ) then
0 commit comments