Hi,
while checking out how the X# compiler deals with our old Vulcan.NET code, I get a lot of compiler errors like this:
Error XS1715 'GapBaseComboBox.Font': type must be 'Font' to match overridden member 'Control.Font'
Since 'Font' and 'Control' exist in many namespaces it would be helpful if the type names in such errors were fully qualified, like this:
Error XS1715 'GapBaseComboBox.Font': type must be 'System.Drawing.Font' to match overridden member 'System.Windows.Forms.Control.Font'
The Vulcan.NET compile doesn't give an error for the same code. Is there a compatibility switch to influence it?
Regards,
Mathias
Unqualified type names in compiler errors
Unqualified type names in compiler errors
We may be able to change the message. I'll have to see.
Do you have an example of code that produces this message ?
Robert
Do you have an example of code that produces this message ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Unqualified type names in compiler errors
Sure, I have attached a solution with two identical projects, one for Vulcan.NET, one for X#.
Regards,
Mathias
Regards,
Mathias
Unqualified type names in compiler errors
Mathias,
I looked at your example and I see what the problem is:
You have created an assign on the DerivedForm class that takes a parameter of type Vulcan.VO.Font. The assign in the parent class has a type of System.Drawing.Font.
Our compiler does not allow that, unless you prefix the assign with the NEW keyword.
Vulcan does not generate a warning but silently creates an assign with the NEW modifier. I think that is not correct. It should have warned, because the compiler can't be sure if this is what you wanted to do.
I agree that the error message should include the fully qualified type name to help locate the problem.
I have added this to the list of tickets. You will be notified when this has been solved.
Robert
I looked at your example and I see what the problem is:
You have created an assign on the DerivedForm class that takes a parameter of type Vulcan.VO.Font. The assign in the parent class has a type of System.Drawing.Font.
Our compiler does not allow that, unless you prefix the assign with the NEW keyword.
Vulcan does not generate a warning but silently creates an assign with the NEW modifier. I think that is not correct. It should have warned, because the compiler can't be sure if this is what you wanted to do.
I agree that the error message should include the fully qualified type name to help locate the problem.
I have added this to the list of tickets. You will be notified when this has been solved.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Unqualified type names in compiler errors
Thank you Robert.
I absolutely agree that this is bad code, but I also want to understand what the reason for the different behavior is. Thank you for explaning it.
Mathias
I absolutely agree that this is bad code, but I also want to understand what the reason for the different behavior is. Thank you for explaning it.
Mathias