view tests/code/scope_3.d @ 54:d84fec04d462 new_gen

Move all root var-decls so they are generated before anything else This allows forward references to globals Added a few tests, testing that scoping is proper and forward referencing of structs and globals
author Anders Halager <halager@gmail.com>
date Sat, 26 Apr 2008 19:13:10 +0200
parents
children
line wrap: on
line source

int y = 0;

int main()
{
    return x + y;
}

int x = 0;