lang: fn aliases dispatch like their target (fix 0121) — scan-time registration through the shared alias-chain walk
Renamed fn aliases failed for EVERY kind (the filed pack-only scope was a same-name confound: same-name re-exports already resolved through the name-keyed fn_ast_map). scanDecls now follows ident-/ns.X-RHS const alias chains (aliasedFnDecl; 0120's hop walk extracted as followAliasChain) and registers the alias name in fn_ast_map (absent-only), so every dispatch path — early pack/comptime/generic, plain lazy-lower, plan-side typing — sees the target decl unchanged. my_print :: s.print; / my_format :: s.format; now work (the std.sx re-export shape). Regression: examples/0546 (+rich). Gates: zig build test 0, suite 588/588.
This commit is contained in:
1
examples/expected/0546-packs-fn-alias.exit
Normal file
1
examples/expected/0546-packs-fn-alias.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/expected/0546-packs-fn-alias.stderr
Normal file
1
examples/expected/0546-packs-fn-alias.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
6
examples/expected/0546-packs-fn-alias.stdout
Normal file
6
examples/expected/0546-packs-fn-alias.stdout
Normal file
@@ -0,0 +1,6 @@
|
||||
pack: 7
|
||||
plain: 7
|
||||
generic: 10
|
||||
ns-pack: 42
|
||||
std-print: 1 two
|
||||
std-format 42
|
||||
Reference in New Issue
Block a user