From e4df72671d75302bbcb972a9e9786e2405d6cde5 Mon Sep 17 00:00:00 2001 From: rdulmina Date: Tue, 3 Dec 2024 14:34:11 +0530 Subject: [PATCH] Revert "Prevent top level node reordering for typedef annotations" This reverts commit 66a8c8e28a8699bc66411aea5e9fca1f5e475aef. --- .../compiler/semantics/analyzer/DataflowAnalyzer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java index fdf60eae6d37..673d2ebdfab1 100644 --- a/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java +++ b/compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/semantics/analyzer/DataflowAnalyzer.java @@ -535,10 +535,9 @@ public void visit(BLangTypeDefinition typeDefinition) { symbol = symbol.type.tsymbol; } this.currDependentSymbolDeque.push(symbol); - // Todo: need to uncomment this line when we handle annotations inline with the type definition. issue #41946 -// for (BLangAnnotationAttachment bLangAnnotationAttachment : typeDefinition.annAttachments) { -// analyzeNode(bLangAnnotationAttachment.expr, env); -// } + for (BLangAnnotationAttachment bLangAnnotationAttachment : typeDefinition.annAttachments) { + analyzeNode(bLangAnnotationAttachment.expr, env); + } analyzeNode(typeDefinition.typeNode, env); this.currDependentSymbolDeque.pop(); }