[Issue 24799] New: [Regression] Protected template constructors cannot be accessed outside their module.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 6 10:55:36 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24799
Issue ID: 24799
Summary: [Regression] Protected template constructors cannot be
accessed outside their module.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dadoum at protonmail.com
It used to work before, as ldc2 1.34 was able to build that code. However, now
neither ldc2 nor dmd can build that code. (This also prevents botan from being
built)
Basic reproducer :
base.d
```d
module base;
class Base {
protected:
this(T)(T) {
}
}
```
super_.d
```d
module super_;
import base;
class Derived: Base {
this() {
super("Example");
}
}
````
```
$ ldc2 -i ./super_.d
./source/super.d(7): Error: constructor `base.Base.__ctor!string.this` is not
accessible from module `super_`
```
--
More information about the Digitalmars-d-bugs
mailing list