digitalmars.D.bugs - [Issue 23138] New: Overrides of member functions of an inherited
- d-bugmail puremagic.com (31/31) May 25 2022 https://issues.dlang.org/show_bug.cgi?id=23138
https://issues.dlang.org/show_bug.cgi?id=23138 Issue ID: 23138 Summary: Overrides of member functions of an inherited class ignores attribute "downcast" Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: contact lsferreira.net The following code compiles and shouldn't because it is illegal to lower the safe to system on an override. The compiler doesn't lower, just ignores it, but this makes the user confuse. ```d class C1 { void foo() pure nothrow safe {} } class C2 : C1 { override void foo() system { // (() system {})(); } } ``` --
May 25 2022