view tests/mini/dgfuncptr.d @ 599:4435f57956e7

Fixed .funcptr property of delegates, no longer uses the infamous DMD rewrites to pointer arithmetic, instead a GEPExp has been introduced.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 15 Sep 2008 02:04:26 +0200
parents tests/mini/compile_dgfuncptr.d@1add138c9ba4
children
line wrap: on
line source

void main()
{
  void foo() {}

  auto dg = &foo;

  if(dg.funcptr is null)
  { assert(0); }
}