int is a reserved word while SomeType is not. Note that it is not certain that SomeType is yet defined when we get "(SomeType)", so we can't assume that it is a cast.
mixed foo() { return (SomeType)"world"; }
constant SomeType = "Hello ";
/ Martin Nilsson (lambda)
Previous text:
2003-05-06 18:33: Subject: Re: Implicit class construction, _cast() and `=()
On Tue, May 06, 2003 at 04:00:02PM +0200, Martin Nilsson (lambda) @ Pike (-) developers forum wrote:
No, you are not. Hilfe is an simulation of Pike, and is not always correct. Write the code in a stand alone file and see what you get.
Strange. Really, I see no difference between (int)something and (SomeType)something (logically), so why it is incorrect in last case?
Regards, /Al
/ Brevbäraren