Skip to content

Looping around the definition of constants confuses the compiler #755

@leon-ts

Description

@leon-ts

The following code causes problems in the X# compiler:

STATIC CLASS Class1
	PUBLIC CONST MyConst := Class1.MyConst AS STRING
END CLASS

The compiler displays a message that does not indicate an error, and when you double-click it, it goes to the wrong place at all.

MSB4181 The "Xsc" task returned false but did not log an error.

P.S. I got the error on a real project (names have been changed).
The MyConst field looked like this:
MyConst: = "MYCONST" AS STRING
Then I did a bulk change of the text "MYCONST" to Class1.MyConst throughout the project. And I didn't notice how the text in the definition of MyConst was also replaced. Then the compiler started giving an error, and I found it with some difficulty.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions