@ball-lang/engine 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/compiled_engine.ts
CHANGED
|
@@ -2896,6 +2896,22 @@ export class BallEngine {
|
|
|
2896
2896
|
if (!__ball_eq(cached, null)) {
|
|
2897
2897
|
return this._callFunction(cached.module, cached.func, input);
|
|
2898
2898
|
}
|
|
2899
|
+
let sawBase = false;
|
|
2900
|
+
let sawUser = false;
|
|
2901
|
+
for (const m of this.program.modules) {
|
|
2902
|
+
for (const f of m.functions) {
|
|
2903
|
+
if (__ball_eq(f.name, function_)) {
|
|
2904
|
+
if (f.isBase) {
|
|
2905
|
+
sawBase = true;
|
|
2906
|
+
} else {
|
|
2907
|
+
sawUser = true;
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
if ((sawBase && sawUser)) {
|
|
2913
|
+
throw new BallRuntimeError((((('Ambiguous unqualified call to "' + __ball_to_string(function_)) + '": a user-defined function ') + 'shadows a base function of the same name. Qualify the call with an ') + 'explicit module to disambiguate (issue #420).'));
|
|
2914
|
+
}
|
|
2899
2915
|
for (const m of this.program.modules) {
|
|
2900
2916
|
for (const f of m.functions) {
|
|
2901
2917
|
if (__ball_eq(f.name, function_)) {
|