diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/scope_3.d	Sat Apr 26 19:13:10 2008 +0200
@@ -0,0 +1,9 @@
+int y = 0;
+
+int main()
+{
+    return x + y;
+}
+
+int x = 0;
+