Skip to content

BUG: CC0021 generates a use NameOf for a constant defined as itself #925

@CZEMacLeod

Description

@CZEMacLeod

#Bug

CC0021 suggests using a constant definition name as itself which does not compile.

'the code that reproduces the bug
Class MyClass
    Public Const MyConst="MyConst"
End Class

Current output after fix applied:

'code fixed incorrectly
Class MyClass
    Public Const MyConst=NameOf(MyConst)
End Class

Error:
BC30500 Constant 'MyConst' cannot depend on its own value.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions