On Friday, 20 October 2017 at 22:15:36 UTC, Steven Schveighoffer wrote:
On 10/20/17 5:55 PM, Patrick wrote:
Due to the very specific nature of the 'is' operator, why wouldn't the compiler know to implicitly query the class types? Why must it be explicitly written, typeof(this)?

The compiler generally doesn't "fix" errors for you, it tells you there is a problem, and then you have to fix it. You have to be clear and unambiguous to the compiler. Otherwise debugging would be hell.

-Steve

Not asking the compiler to fix my errors.

When would
is(this, myClass) not mean: is(typeof(this) : typeof(myClass))?

Why would "is(this, myClass)" be ambiguous? What other interpretation would "is(this, myClass)" imply?

Patrick


Reply via email to