D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15278 - Compile-time segfault when compiling code with alias this
Summary: Compile-time segfault when compiling code with alias this
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 major
Assignee: No Owner
URL:
Keywords: ice, pull
Depends on:
Blocks:
 
Reported: 2015-11-02 23:02 UTC by Andrei Alexandrescu
Modified: 2020-03-21 03:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrei Alexandrescu 2015-11-02 23:02:00 UTC
dmd v2.069-devel-5db650f segfaults while compiling this code with -unittest:

module persistent_list;
import std.experimental.allocator;

struct List(T)
{
	private IAllocator allocator;
	private List!T unqualifiedCopy() const;
	alias unqualifiedCopy this;
}

void main()
{
	List!(immutable int) lst;
}
Comment 1 ag0aep6g 2015-11-02 23:16:53 UTC
Reduced:
----
interface IAllocator {}

struct List
{
    IAllocator allocator;
    List unqualifiedCopy() const;
    alias unqualifiedCopy this;
}
----
Comment 3 basile-z 2019-07-16 20:30:43 UTC
fixed since 2.086