# HG changeset patch # User Christian Kamm # Date 1234891534 -3600 # Node ID d96471e8b5e512e318ce727b99cf00a1dbe8a875 # Parent d66ab756c75b8339b356d01bb67edc7e8041c7ef Fix #216 by implementing TypeExp::toElem. It just provides the appropriate error message. diff -r d66ab756c75b -r d96471e8b5e5 gen/toir.cpp --- 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