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

TOPIC: Compiler warning for missing type in declaration

Compiler warning for missing type in declaration 3 years 3 months ago #190

  George's Avatar Topic Author George Offline Posts: 91
Hi,

is-there precaution (in X# compiler) to issue a warning that the variable will be USUAL when I write:

LOCAL cVariable := "something"
forgeting the 'AS TYPE' ?

regards
George

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

Compiler warning for missing type in declaration 3 years 3 months ago #191

  Chris's Avatar Chris Offline Posts: 1179
Hi George!

The current version of the C# compiler does not support USUALs anyway, so your sample is producing an error at this line with a message "Type expected". In future builds, there will be a compiler option with which you'll be able to specify that you want to use the core version of the compiler (so still an error reported in that kind of code), the VO/Vulcan compatibility one (so no error) etc. Even in the case of using the VO compatibility flavor, I think we can also add an optional (via a compiler switch) warning on defining vars without explicitly specifying their type.

Chris
XSharp Development Team
chris(at)xsharp.eu

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

Compiler warning for missing type in declaration 3 years 3 months ago #192

  Chris's Avatar Chris Offline Posts: 1179
> The current version of the C# compiler does ...

That should read "the X# compiler" of course!!

Chris
XSharp Development Team
chris(at)xsharp.eu

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

Compiler warning for missing type in declaration 3 years 3 months ago #193

  George's Avatar Topic Author George Offline Posts: 91
Chris,

thank you for your answer.

I just tried the X# in both XIDE and VS2015.

No problem at all with the test App in XIDE (it's a mature product), but in VS2015 a simple WinForms app created using the template, do not run the debugger because the System.Drawing isn't automatically added to the references.

regards
George

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

Compiler warning for missing type in declaration 3 years 3 months ago #194

  Chris's Avatar Chris Offline Posts: 1179
Hi George,

Thanks for your report. I confirm that System.Drawing.dll is not automatically added as a reference, but even so, for some reason in my machine the WinForms app template builds and runs just fine here! Not sure why this is happening, will investigate it. I guess if you manually add the reference the sample works on your machine, too, is that right?

Chris
XSharp Development Team
chris(at)xsharp.eu

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

Compiler warning for missing type in declaration 3 years 3 months ago #195

  George's Avatar Topic Author George Offline Posts: 91
Chris,

>I guess if you manually add the reference the sample works on your machine, too, is that right?

True.

regards
George

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

  • Page:
  • 1