Mercurial > projects > ldc
changeset 973:d96471e8b5e5
Fix #216 by implementing TypeExp::toElem. It just provides the appropriate
error message.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 17 Feb 2009 18:25:34 +0100 |
parents | d66ab756c75b |
children | 815e1b8c6b00 |
files | gen/toir.cpp |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/toir.cpp Tue Feb 17 01:13:18 2009 +0100 +++ b/gen/toir.cpp Tue Feb 17 18:25:34 2009 +0100 @@ -2571,11 +2571,21 @@ ////////////////////////////////////////////////////////////////////////////////////////// +DValue* TypeExp::toElem(IRState *p) +{ + error("type %s is not an expression", toChars()); + //TODO: Improve error handling. DMD just returns some value here and hopes + // some more sensible error messages will be triggered. + fatal(); + return NULL; +} + +////////////////////////////////////////////////////////////////////////////////////////// + #define STUB(x) DValue *x::toElem(IRState * p) {error("Exp type "#x" not implemented: %s", toChars()); fatal(); return 0; } STUB(Expression); STUB(TypeDotIdExp); STUB(ScopeExp); -STUB(TypeExp); STUB(TupleExp); #if DMDV2