Bug 15668 – [REG2.068.0] __LINE__ evaluated at declaration context
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-02-10T05:55:00Z
Last change time
2016-02-11T11:55:02Z
Keywords
rejects-valid, wrong-code
Assigned to
nobody
Creator
public
Comments
Comment #0 by public — 2016-02-10T05:55:00Z
---
void foo ( int line = __LINE__ ) ( int x = 42 )
{
static assert (line == 8);
}
void main()
{
foo();
}
// Error: static assert (1 == 8) is false
// instantiated from here: foo!1
---
According to `git bisect` regression was introduced by https://github.com/D-Programming-Language/dmd/pull/4261 (between 2.067 and 2.068) and it still fails on 2.070