D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10303 - Constraining interfaces with some std.traits methods causes crash
Summary: Constraining interfaces with some std.traits methods causes crash
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2013-06-08 11:35 UTC by Eric
Modified: 2020-05-24 08:16 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Eric 2013-06-08 11:35:05 UTC
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 basile-z 2020-05-24 08:16:19 UTC
according to run.dalng.io this is fixed since v2.067.1.