view tests/mini/const1.d @ 863:6c850977a941

modified gen/linker.cpp to only append .exe suffix on windows if not already present
author elrood
date Thu, 18 Dec 2008 19:24:33 +0100
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);
}