fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Unqualified type names in compiler errors

Unqualified type names in compiler errors 6 months 3 weeks ago #1

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

Please Log in or Create an account to join the conversation.

Last edit: by Kromi.

Unqualified type names in compiler errors 6 months 3 weeks ago #2

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
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Unqualified type names in compiler errors 6 months 3 weeks ago #3

Sure, I have attached a solution with two identical projects, one for Vulcan.NET, one for X#.

Regards,
Mathias

File Attachment:

File Name: Compatibility.zip
File Size:775 KB
Attachments:

Please Log in or Create an account to join the conversation.

Unqualified type names in compiler errors 6 months 3 weeks ago #4

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
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Unqualified type names in compiler errors 6 months 3 weeks ago #5

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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1