diff --git a/src/codegen/expressions/method-calls.ts b/src/codegen/expressions/method-calls.ts index 68fa970f..15f25812 100644 --- a/src/codegen/expressions/method-calls.ts +++ b/src/codegen/expressions/method-calls.ts @@ -1043,7 +1043,10 @@ export class MethodCallGenerator { imp.source.startsWith("../") || imp.source.startsWith("/"); if (!isRelative && imp.specifiers && imp.specifiers.indexOf(varName) !== -1) { - return "null"; + return this.ctx.emitError( + `'${varName}.${method}()' — module '${imp.source}' is not supported by ChadScript`, + expr.loc, + ); } } }