Issue Description
Constructor Calls Get Incorrectly Interpreted As Variable Declarations.
More Specifically One-line Single-Parameter Constructor-Calls get Incorrectly-Interpreted as attempts to redefine the type of a named parameter.
Steps to Reproduce
class myThing
{
public:
myThing(int a) {}
};
void main()
{
int mz = 5;
myThing(mz);
}
Expected Behavior
Calls constructor
Actual Behavior
Redefines identifier
Analysis
The issue here is the existence of the second line in main which looks like and triggers a variable definition path somewhere early in the compiler, in this case the existence of a type with a name is not sufficient to determine the line type, it is also necessary to consider the presence of "(" bra-kets and possibly more
Versions & Configurations
All Versions Of msBuild AFAIK