diff --git a/es2panda/compiler/core/emitter/emitter.cpp b/es2panda/compiler/core/emitter/emitter.cpp index 53064fdc1dea20e7c450060e75a09504cadcdc15..36de4fb48e1b62b3a2be4b4b3669bf070a738e8d 100644 --- a/es2panda/compiler/core/emitter/emitter.cpp +++ b/es2panda/compiler/core/emitter/emitter.cpp @@ -345,6 +345,7 @@ Emitter::Emitter(const CompilerContext *context) if (context->IsMergeAbc()) { auto recordName = context->Binder()->Program()->RecordName().Mutf8(); rec_ = new panda::pandasm::Record(recordName.substr(0, recordName.find_last_of('.')), LANG_EXT); + rec_->source_file = context->SourceFile(); SetCommonjsField(context->Binder()->Program()->Kind() == parser::ScriptKind::COMMONJS); } else { rec_ = nullptr;