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
68
68
resolved = true ;
69
69
continue ;
70
70
}
71
- block . deactivate ( ) ;
71
+ block . deactivateContent ( ) ;
72
72
this . inactiveBlocks . push ( block ) ;
73
73
}
74
74
}
@@ -106,9 +106,12 @@ class CompilerConditionBlock extends BaseRuleSyntaxElement<CompilerConditionalBl
106
106
return result ;
107
107
}
108
108
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
+ }
112
115
}
113
116
}
114
117
You can’t perform that action at this time.
0 commit comments