Bug 17893 – [REG 2.076.1] contract in templatized final class require nothrow
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-10-11T10:16:00Z
Last change time
2017-11-03T18:41:19Z
Assigned to
No Owner
Creator
Basile B.
Comments
Comment #0 by b2.temp — 2017-10-11T10:16:00Z
test case:
---
final class Foo(T)
{
void bar()
in
{
import std.algorithm.iteration: reduce;
auto b = [0].reduce!((a,b) => a + b);
}
body
{
}
}
Foo!int foo;
---
compiles if A or B or C:
A. code is not in contract
B. Foo is not final
C. Foo is not a template