Skip to content

[Bug]Using Compiler Declarative #Const throw Invalid syntax #96

@danielheuer

Description

@danielheuer

Describe the bug
Using Compiler Declaratives within code throw Error
Duplicate declaration 'name' in current scope.
Invalid syntax: #Const DBG = False Or DBGALL

To Reproduce
write Code

Code (if relevant)

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "name"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Option Explicit
#Const DBG = False Or DBGALL

Expected behavior
#Const is a legal syntax (also #if, #else, #elseif, #endif and maybe others)

Screenshots

Image

Additional context
probably the logical operator 'Or' in above example maybe the issue, but this is legal
DBGALL is defined in Projectproperties

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions