Mercurial > projects > ddmd
diff dmd/TypeTypeof.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 | e28b18c23469 |
children | e3afd1303184 |
line wrap: on
line diff
--- a/dmd/TypeTypeof.d Sun Sep 05 15:32:22 2010 +0400 +++ b/dmd/TypeTypeof.d Thu Sep 09 22:51:44 2010 +0100 @@ -132,6 +132,7 @@ if (exp.op == TOK.TOKtype) { error(loc, "argument %s to typeof is not an expression", exp.toChars()); + goto Lerr; } t = exp.type; if (!t) @@ -140,7 +141,10 @@ goto Lerr; } if (t.ty == TY.Ttypeof) + { error(loc, "forward reference to %s", toChars()); + goto Lerr; + } /* typeof should reflect the true type, * not what 'auto' would have gotten us.