fix(lang): a function named like an engine namespace method's target is refused
Random.range is rng_range, so a package's own rng_range(a, b, c) took every Random.range call silently. Where the program calls such a method and the target resolves to a function of its own, the function is refused, naming the namespace method and the call. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
31d842fca4
commit
73129b59d5
8 changed files with 13668 additions and 13100 deletions
|
|
@ -9,6 +9,7 @@ var g_al_ns: []pointer = new []pointer
|
|||
var g_al_meth: []pointer = new []pointer
|
||||
var g_al_target: []pointer = new []pointer
|
||||
var g_al_labels: []pointer = new []pointer # "a|b|c"; "" for none; null for the target's own
|
||||
var g_al_file: []pointer = new []pointer # where the alias is declared (the engine's: runtime/native)
|
||||
|
||||
function ns_parse_alias(nsname: pointer, is_exp: int) -> void {
|
||||
pi += 1
|
||||
|
|
@ -33,6 +34,7 @@ function ns_parse_alias(nsname: pointer, is_exp: int) -> void {
|
|||
push(g_al_meth, meth)
|
||||
push(g_al_target, target)
|
||||
push(g_al_labels, labels)
|
||||
push(g_al_file, g_parse_file)
|
||||
}
|
||||
function ns_alias_find(ns: pointer, meth: pointer) -> int {
|
||||
var i = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue