File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -525,12 +525,9 @@ class SemanticAnalyzer {
525525 let stmtIndex = 0 ;
526526 for ( const stmt of ast . statements ) {
527527 if ( stmt && stmt . type === 'EventHandler' ) {
528- // Each if statement gets a unique key - we want to detect multiple
529- // assignments within the SAME if block, not across different if
530- // statements that happen to have the same condition
531- const handlerKey = stmt . handler === 'ifthen' ?
532- `ifthen:${ stmtIndex } ` :
533- stmt . handler ;
528+ // Each handler gets a unique key - we want to detect multiple
529+ // assignments within the SAME handler, not across different handlers
530+ const handlerKey = `${ stmt . handler } :${ stmtIndex } ` ;
534531
535532 if ( ! handlerAssignments . has ( handlerKey ) ) {
536533 handlerAssignments . set ( handlerKey , new Map ( ) ) ;
Original file line number Diff line number Diff line change @@ -297,14 +297,14 @@ class ConditionGenerator {
297297 return this . generateBinary ( {
298298 ...condition ,
299299 operator : '>' ,
300- right : constValue - 1
300+ right : { type : 'Literal' , value : constValue - 1 }
301301 } , activatorId ) ;
302302 } else {
303303 // x <= 5 → x < 6
304304 return this . generateBinary ( {
305305 ...condition ,
306306 operator : '<' ,
307- right : constValue + 1
307+ right : { type : 'Literal' , value : constValue + 1 }
308308 } , activatorId ) ;
309309 }
310310 }
You can’t perform that action at this time.
0 commit comments