Mercurial > projects > ldc
diff gen/toir.cpp @ 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 | 2ebac4750adb |
children | 73ff89728d85 |
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