digitalmars.D.bugs - [Issue 20178] New: Add
- d-bugmail puremagic.com (27/27) Aug 28 2019 https://issues.dlang.org/show_bug.cgi?id=20178
https://issues.dlang.org/show_bug.cgi?id=20178 Issue ID: 20178 Summary: Add TypeInfo_Class/TypeInfo_Interface.isDerivedFrom argument swapped with the receiver) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: n8sh.secondary hotmail.com determine at runtime whether a class inherits from or implements another class or interface. Adding something similar to TypeInfo_Class and TypeInfo_Interface would be useful. but is potentially misleading since since -- due to "alias this" and the ability to overload opAssign -- whether a value of type Y can be assigned to a variable of type X is not the same as asking if Y inherits from or implements X. The language "derives from" is used in the D specification so I'm suggesting "isDerivedFrom" swapping the receiver and argument relative to "isAssignableFrom." --
Aug 28 2019