digitalmars.D.bugs - [Issue 17738] New: access to local alias from outside compiles but
- via Digitalmars-d-bugs (29/29) Aug 10 2017 https://issues.dlang.org/show_bug.cgi?id=17738
https://issues.dlang.org/show_bug.cgi?id=17738 Issue ID: 17738 Summary: access to local alias from outside compiles but execution hangs Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: dominikus scherkl.de import std.traits; foo.C foo(T, U)(const(T) a, const(U) b) { alias C = CommonType!(T, U); return cast(C)a + cast(C)b; } // compiles, but execution hangs (programm uses 100% CPU and only ends after stack overflow is reached some time later) CommonType!(T, U) foo2(T, U)(const(T) a, const(U) b) { alias C = CommonType!(T, U); return cast(C)a + cast(C)b; } // compiles and runs fine --
Aug 10 2017