view tests/mini/const1.d @ 654:961221d5a49c

Updated llvmdc-tango Rebuild profile, liblink was wrong
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 06 Oct 2008 10:23:25 +0200
parents 722630261d62
children
line wrap: on
line source

module mini.const1;

void* g = cast(void*)&foobar;

int foobar()
{
    return 42;
}

void main()
{
    auto fn = cast(int function())g;
    int i = fn();
    assert(i == 42);
}