https://issues.dlang.org/show_bug.cgi?id=23291
--- Comment #6 from Ruby The Roobster <rubytheroobs...@yandex.com> --- (In reply to Boris Carvajal from comment #4) > (In reply to Ruby The Roobster from comment #3) > > (In reply to Boris Carvajal from comment #2) > > > Same as issue 23140, it never worked! > > > > > > > This code actually did work as intended, 23140, unless you mean something > > else which I don't understand. > > Because type modifiers in class definitions were not applied before due to a > bug, structs were though. > > ```d > shared class C {} > const(C) c = new C(); // this should be 'shared' implicitly > pragma(msg, typeof(c)); // now it's 'shared(const(C))' but before it was > only 'const(C)' > > ``` > So the code worked because 'shared' was discarded. Ah. I forgot about that. So it turns out that this bug is far older than I imagined. --