@@ -1650,7 +1650,7 @@ function serializeBridgeBlock(bridge: Bridge): string {
16501650 }
16511651 }
16521652
1653- // Emit block-scoped local bindings: alias <source> as <name >
1653+ // Emit block-scoped local bindings: alias <name> <- <source >
16541654 for ( const [ alias , info ] of localBindingsByAlias ) {
16551655 // Ternary alias in element scope
16561656 if ( info . ternaryWire ) {
@@ -1679,7 +1679,7 @@ function serializeBridgeBlock(bridge: Bridge): string {
16791679 const fallbackStr = serFallbacks ( tw , sPipeOrRef ) ;
16801680 const errf = serCatch ( tw , sPipeOrRef ) ;
16811681 lines . push (
1682- `${ indent } alias ${ condStr } ? ${ thenStr } : ${ elseStr } ${ fallbackStr } ${ errf } as ${ alias } ` ,
1682+ `${ indent } alias ${ alias } <- ${ condStr } ? ${ thenStr } : ${ elseStr } ${ fallbackStr } ${ errf } ` ,
16831683 ) ;
16841684 continue ;
16851685 }
@@ -1769,7 +1769,11 @@ function serializeBridgeBlock(bridge: Bridge): string {
17691769 sourcePart = sRef ( fromRef , true ) ;
17701770 }
17711771 }
1772- lines . push ( `${ indent } alias ${ sourcePart } as ${ alias } ` ) ;
1772+ const elemFb = serFallbacks ( srcWire , sPipeOrRef ) ;
1773+ const elemErrf = serCatch ( srcWire , sPipeOrRef ) ;
1774+ lines . push (
1775+ `${ indent } alias ${ alias } <- ${ sourcePart } ${ elemFb } ${ elemErrf } ` ,
1776+ ) ;
17731777 }
17741778
17751779 // Emit element-scoped tool declarations: with <tool> as <handle>
@@ -2219,7 +2223,7 @@ function serializeBridgeBlock(bridge: Bridge): string {
22192223 }
22202224
22212225 // ── Top-level alias declarations ─────────────────────────────────────
2222- // Emit `alias <source> as <name >` for __local bindings that are NOT
2226+ // Emit `alias <name> <- <source >` for __local bindings that are NOT
22232227 // element-scoped (those are handled inside serializeArrayElements).
22242228 for ( const [ alias , info ] of localBindingsByAlias ) {
22252229 // Ternary alias: emit `alias <cond> ? <then> : <else> [fallbacks] as <name>`
@@ -2237,7 +2241,7 @@ function serializeBridgeBlock(bridge: Bridge): string {
22372241 const fallbackStr = serFallbacks ( tw , sPipeOrRef ) ;
22382242 const errf = serCatch ( tw , sPipeOrRef ) ;
22392243 lines . push (
2240- `alias ${ condStr } ? ${ thenStr } : ${ elseStr } ${ fallbackStr } ${ errf } as ${ alias } ` ,
2244+ `alias ${ alias } <- ${ condStr } ? ${ thenStr } : ${ elseStr } ${ fallbackStr } ${ errf } ` ,
22412245 ) ;
22422246 continue ;
22432247 }
@@ -2294,7 +2298,7 @@ function serializeBridgeBlock(bridge: Bridge): string {
22942298 }
22952299 const aliasFb = serFallbacks ( srcWire , sPipeOrRef ) ;
22962300 const aliasErrf = serCatch ( srcWire , sPipeOrRef ) ;
2297- lines . push ( `alias ${ sourcePart } ${ aliasFb } ${ aliasErrf } as ${ alias } ` ) ;
2301+ lines . push ( `alias ${ alias } <- ${ sourcePart } ${ aliasFb } ${ aliasErrf } ` ) ;
22982302 }
22992303 // Also emit wires reading from top-level __local bindings
23002304 for ( const lw of localReadWires ) {
0 commit comments