Skip to content

Erroneous indication of several compilation directives (SeveralCompilerDirectives)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Error BSL
OS
Critical Yes 5 unpredictable
error

Description

It is an error to specify multiple compilation directives to a module method or variable. In addition, specifying several different directives leads to ambiguities: will the code compile? And if so, in what context?

Examples

Incorrect:

&AtServer
&AtClient
Var MyVariable;

&AtServer
&AtClient
Procedure MyProcedure()

EndProcedure

Snippets

Diagnostic ignorance in code

// BSLLS:SeveralCompilerDirectives-off
// BSLLS:SeveralCompilerDirectives-on

Parameter for config

"SeveralCompilerDirectives": false