File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
server/src/project/elements Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class CompilerLogicalBlock extends BaseRuleSyntaxElement<CompilerIfBlockC
6868 resolved = true ;
6969 continue ;
7070 }
71- block . deactivate ( ) ;
71+ block . deactivateContent ( ) ;
7272 this . inactiveBlocks . push ( block ) ;
7373 }
7474 }
@@ -106,9 +106,12 @@ class CompilerConditionBlock extends BaseRuleSyntaxElement<CompilerConditionalBl
106106 return result ;
107107 }
108108
109- deactivate ( ) : void {
110- this . diagnosticCapability = new DiagnosticCapability ( this ) ;
111- this . diagnosticCapability . diagnostics . push ( new UnreachableCodeDiagnostic ( this . context . range ) ) ;
109+ deactivateContent ( ) : void {
110+ const contentRange = this . context . rule . compilerBlockContent ( ) ?. toRange ( this . context . document ) ;
111+ if ( contentRange ) {
112+ this . diagnosticCapability = new DiagnosticCapability ( this ) ;
113+ this . diagnosticCapability . diagnostics . push ( new UnreachableCodeDiagnostic ( contentRange ) ) ;
114+ }
112115 }
113116}
114117
You can’t perform that action at this time.
0 commit comments