[Issue 17893] New: [REG 2.076.1] contract in templatized final class require nothrow
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 11 10:16:00 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17893
Issue ID: 17893
Summary: [REG 2.076.1] contract in templatized final class
require nothrow
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
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
--
More information about the Digitalmars-d-bugs
mailing list