Skip to content

Commit

Permalink
cast const ptr checks: astNewCONV(); check only CONST bits
Browse files Browse the repository at this point in the history
  • Loading branch information
jayrm committed Aug 5, 2018
1 parent c712409 commit 66345a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/ast-node-conv.bas
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function astNewCONV _
if( typeGetDtAndPtrOnly( ldtype ) = typeGetDtAndPtrOnly( to_dtype ) ) then
if( l->subtype = to_subtype ) then
'' Only CONST bits changed?
if( ldtype <> to_dtype ) then
if( typeGetConstMask( ldtype ) <> typeGetConstMask( to_dtype ) ) then
'' CONST node? Evaluate at compile-time
if( astIsCONST( l ) ) then
astSetType( l, to_dtype, to_subtype )
Expand Down

0 comments on commit 66345a0

Please sign in to comment.