Ignore:
Timestamp:
Feb 1, 2024, 5:05:54 PM (4 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
9ddcee1
Parents:
32490deb
Message:

Fix dangling reference to posE function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    r32490deb r496ffc17  
    751751                 * returns to zero.
    752752                 */
    753                 auto dstExpr = new ast::VariableExpr( location, dstParam );
    754                 const ast::Expr * srcExpr;
    755                 if ( decl->base ) {
    756                         srcExpr = new ast::ApplicationExpr( location,
    757                         ast::VariableExpr::functionPointer( location, genPosProto() ),
    758                         {
    759                                 new ast::VariableExpr( location, srcParam )
    760                         }
    761                         );
    762                 } else {
    763                         srcExpr = new ast::VariableExpr( location, srcParam );
    764                 }
    765 
    766753                auto callExpr = new ast::ApplicationExpr( location,
    767754                        ast::VariableExpr::functionPointer( location, functionDecl ),
    768755                        {
    769                                 dstExpr,
    770                                 srcExpr,
     756                                new ast::VariableExpr( location, dstParam ),
     757                                new ast::VariableExpr( location, srcParam )
    771758                        }
    772759                );
Note: See TracChangeset for help on using the changeset viewer.