changeset 58:ecf732dfe11e

Statement.error Dsymbol.equals SuperExp.toCBuffer DotVarExp.isLvalue FuncExp.toChars
author korDen
date Sat, 21 Aug 2010 14:52:59 +0400
parents 3adbb28755e8
children 35afd9294854
files dmd/DotVarExp.d dmd/Dsymbol.d dmd/FuncExp.d dmd/Statement.d dmd/SuperExp.d
diffstat 5 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/DotVarExp.d	Sat Aug 21 14:46:32 2010 +0400
+++ b/dmd/DotVarExp.d	Sat Aug 21 14:52:59 2010 +0400
@@ -128,7 +128,7 @@
 
 	int isLvalue()
 	{
-		assert(false);
+		return 1;
 	}
 
 	Expression toLvalue(Scope sc, Expression e)
--- a/dmd/Dsymbol.d	Sat Aug 21 14:46:32 2010 +0400
+++ b/dmd/Dsymbol.d	Sat Aug 21 14:52:59 2010 +0400
@@ -169,7 +169,16 @@
 
     bool equals(Object o)
 	{
-		assert(false);
+		Dsymbol s;
+
+		if (this is o)
+			return true;
+			
+		s = cast(Dsymbol)(o);
+		if (s && ident.equals(s.ident))
+			return true;
+
+		return false;
 	}
 
     bool isAnonymous()
--- a/dmd/FuncExp.d	Sat Aug 21 14:46:32 2010 +0400
+++ b/dmd/FuncExp.d	Sat Aug 21 14:52:59 2010 +0400
@@ -91,7 +91,7 @@
 
 	string toChars()
 	{
-		assert(false);
+		return fd.toChars();
 	}
 
 	void toCBuffer(OutBuffer buf, HdrGenState* hgs)
--- a/dmd/Statement.d	Sat Aug 21 14:46:32 2010 +0400
+++ b/dmd/Statement.d	Sat Aug 21 14:52:59 2010 +0400
@@ -49,7 +49,7 @@
 
     void error(T...)(string format, T t)
 	{
-		assert(false);
+		.error(loc, format, t);
 	}
 	
     void warning(T...)(string format, T t)
--- a/dmd/SuperExp.d	Sat Aug 21 14:46:32 2010 +0400
+++ b/dmd/SuperExp.d	Sat Aug 21 14:52:59 2010 +0400
@@ -104,7 +104,7 @@
 
 	void toCBuffer(OutBuffer buf, HdrGenState* hgs)
 	{
-		assert(false);
+		buf.writestring("super");
 	}
 
 	void scanForNestedRef(Scope sc)