diff dmd/SymOffExp.d @ 130:60bb0fe4563e

dmdfe 2.037 first main iteration
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Thu, 09 Sep 2010 22:51:44 +0100
parents 010eb8f0e18d
children af1bebfd96a4
line wrap: on
line diff
--- a/dmd/SymOffExp.d	Sun Sep 05 15:32:22 2010 +0400
+++ b/dmd/SymOffExp.d	Thu Sep 09 22:51:44 2010 +0100
@@ -59,7 +59,14 @@
 		if (v)
 		{
 			if (!v.isDataseg())
+			{   /* BUG: This should be allowed:
+				 *   void foo()
+				 *   { int a;
+				 *     int* bar() { return &a; }
+				 *   }
+				 */
 				error("escaping reference to local variable %s", v.toChars());
+			}
 		}
 	}