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: nob...@puremagic.com
          Reporter: domini...@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

--

Reply via email to