Bug 10303 – Constraining interfaces with some std.traits methods causes crash
Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-08T11:35:05Z
Last change time
2020-05-24T08:16:19Z
Keywords
ice
Assigned to
No Owner
Creator
Eric
Comments
Comment #0 by eric — 2013-06-08T11:35:05Z
The following code will cause the compiler to crash:
import std.traits;
interface Identity(V, K) if (hasMember!(V, "k")) {
}
class Foo(K): Identity!(Foo!K, K) {
K k;
}
void main() {
new Foo!double;
}
This occurs on both compiler versions, 2.062 and
v2.063-devel-53aa503.
I should also add that many of the "functions" in std.traits
will cause the compiler to crash when used to constrain an
interface in this manner.
Comment #1 by b2.temp — 2020-05-24T08:16:19Z
according to run.dalng.io this is fixed since v2.067.1.