From d4585c85f3a20dcdb033e069194f55d17071d4a4 Mon Sep 17 00:00:00 2001 From: NipunaMadhushan Date: Mon, 2 Sep 2024 17:42:18 +0530 Subject: [PATCH] Add observe internal module as first import --- .../ballerinalang/compiler/desugar/ObservabilityDesugar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/ObservabilityDesugar.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/ObservabilityDesugar.java index 06f5c60d1c19..48145dcddd7d 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/ObservabilityDesugar.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/ObservabilityDesugar.java @@ -67,7 +67,7 @@ void addObserveInternalModuleImport(BLangPackage pkgNode) { importDcl.alias = ASTBuilderUtil.createIdentifier(pkgNode.pos, "_"); importDcl.version = ASTBuilderUtil.createIdentifier(pkgNode.pos, ""); importDcl.symbol = packageCache.getSymbol(PackageID.OBSERVE_INTERNAL); - pkgNode.imports.add(importDcl); + pkgNode.imports.add(0, importDcl); pkgNode.symbol.imports.add(importDcl.symbol); } }