Bug 18410 – [REG 2.079a] Conflict between overloads distinguished by parameter constness
Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-02-09T15:09:49Z
Last change time
2018-02-09T15:21:49Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Basile B.
Comments
Comment #0 by b2.temp — 2018-02-09T15:09:49Z
This code
```
struct Foo(T)
{
this(T){}
this(const T){}
}
alias S = Foo!(const int);
```
is not accepted since https://github.com/dlang/dmd/pull/7577. But curiously,
```
struct Bar
{
this(int){}
this(const int){}
}
```
is still accepted.
Comment #1 by b2.temp — 2018-02-09T15:18:53Z
The second example is unrelated actually. I can see the same problem with
```
struct Bar
{
this(const int){}
this(const const(int)){}
}
```
DMD 2.078.2 still accepts. Not 2.079a