Mercurial > archived > louis > epitech > mq > rathaxes
view rathaxes_compiler_passes_look_for_locally_casted_variables_in_sequence_calls.patch @ 115:5a663f8f0e54
WIP, fix another small bug in rathaxes sequence calls
author | Louis Opter <louis@lse.epita.fr> |
---|---|
date | Mon, 22 Jul 2013 13:52:00 -0700 |
parents | |
children |
line wrap: on
line source
# HG changeset patch # User David Pineau <dav.pineau@gmail.com>, Louis Opter <louis@lse.epita.fr> # Parent 163975605ce8e4b9049deb60207358acc904f14c rathaxes: correctly resolve locally casted variables during sequence calls C variables declared locally and casted into Rathaxes types weren't taken into account during sequence calls. This changeset fixes it. diff --git a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws --- a/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws +++ b/rathaxes/compiler/passes/back/rtxIntrospect.inc.cws @@ -751,6 +751,8 @@ local theType; if (findElement(theVar.name, theChunk.type_map)) ref theType = theChunk.type_map[theVar.name]; + else if (findElement(theVar.name, theChunk.variables)) + ref theType = theChunk.variables[theVar.name].type_node; insert param.rtype; if (getArraySize(param.identifiers) > 2) {