Bug 19293 – Qualified inherited class does not have any effect

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-10-08T10:36:56Z
Last change time
2023-10-16T04:42:24Z
Keywords
accepts-invalid, bootcamp
Assigned to
No Owner
Creator
RazvanN

Comments

Comment #0 by razvan.nitu1305 — 2018-10-08T10:36:56Z
import std.stdio : writeln; class A { int a; } class B : immutable(A) { this(int a) { this.a = a; } void fun() { a = 8; } } void main() { B b = new B(7); writeln(b.a); // 7 b.fun(); writeln(b.a); // 8 } According to the grammar, the inheritance list can contain only unqualified types, so this code should be rejected ("cannot qualifiy inherited class types").
Comment #1 by b2.temp — 2023-10-16T04:42:24Z
The grammar has changed since, making the report invalid.