Page MenuHomeFeedback Tracker

Enscript error on explicit reference type to bool cast.
Closed, ResolvedPublic

Description

If you try to cast a reference type (complex type whatever you wanna call it) to a bool, implicit cast (if it's even a cast at this point) works fine while explicit cast throws some nonsense error.

class MyType { }
void MyFn() {
  MyType myType;
  bool isNull1 = myType;
  bool isNull2 = (bool)myType; // throws error, "Can't find variable 'myType'" wat?
}

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Geez changed the task status from New to Assigned.Oct 16 2022, 11:06 PM
Geez closed this task as Resolved.Apr 26 2023, 2:33 PM
Geez claimed this task.
Geez added a subscriber: Geez.

Resolved for one of the future updates.