Ignore:
Timestamp:
Jul 31, 2023, 11:25:51 AM (11 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
f496046
Parents:
e0332dd
Message:

Added invariant to check that referenced declarations are in scope. This one took a while, I don't remember why forall pointer decay is involved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    re0332dd r14c0f7b  
    891891                                dst = new ast::AddressExpr(dst);
    892892                        }
    893                 }
    894                 else {
     893                } else {
    895894                        dst = new ast::CastExpr(dst, new ast::ReferenceType(dst->result, {}));
    896895                }
     
    900899                        }
    901900                }
    902                 return new ast::ApplicationExpr(dst->location, ast::VariableExpr::functionPointer(dst->location, assign), {dst, src});
     901                auto var = ast::VariableExpr::functionPointer(dst->location, assign);
     902                auto app = new ast::ApplicationExpr(dst->location, var, {dst, src});
     903                // Skip the resolver, just set the result to the correct type.
     904                app->result = ast::deepCopy( src->result );
     905                return app;
    903906        }
    904907
Note: See TracChangeset for help on using the changeset viewer.