Bug 10606 – DMD Exit code 139

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2013-07-11T01:52:00Z
Last change time
2015-04-03T07:18:54Z
Assigned to
nobody
Creator
kozzi11

Comments

Comment #0 by kozzi11 — 2013-07-11T01:52:23Z
When I try compile code like this: module main; class A(T) { static string g(string v) { return "a" ~ v; } immutable b = immutable C!(T)("u"); } class B : A!(B) {} immutable struct C(T) { string a; alias a this; this(string a) { this.a = T.g(a); // but with this.a = a it is ok; } } void main(string[] args) {} I get Exit code 139
Comment #1 by yebblies — 2013-11-20T22:28:55Z
Now gives testx.d(13): Error: no property 'g' for type 'testx.B' testx.d(6): Error: template instance testx.A!(B) error instantiating
Comment #2 by kozzi11 — 2013-11-21T02:45:29Z
(In reply to comment #1) > Now gives > > testx.d(13): Error: no property 'g' for type 'testx.B' > testx.d(6): Error: template instance testx.A!(B) error instantiating This is better than exit code 139. But is this desired behaviour? When I rewrite: immutable b = immutable C!(T)("u"); to: immutable b = immutable C!(A!T)("u"); It works as I expected, but why I can not just write T instead of A!T? Maybe some circular reference?
Comment #3 by kozzi11 — 2015-04-03T07:18:54Z
With 2.067 it works ok