https://issues.dlang.org/show_bug.cgi?id=23815

Salih Dincer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Salih Dincer <[email protected]> ---
No problem, the code compiles for me:

alias T = int;

class C
{
  static T i;
  this(T n) { i = n; }
}

alias fo = T function();  // not compile
alias foo = T delegate(); // compile

auto ID(C c)
{
  foo f = () => c.i;
  return f();
}

void main()
{
  auto test = new C(42);
  assert(test.ID == 42);
}

--

Reply via email to