Index: ChangeLog
===================================================================
RCS file: /mono/mcs/class/System/ChangeLog,v
retrieving revision 1.56
diff -u -r1.56 ChangeLog
--- ChangeLog	27 Jul 2003 09:58:55 -0000	1.56
+++ ChangeLog	15 Aug 2003 22:33:13 -0000
@@ -1,3 +1,25 @@
+2003-08-15  Jaroslaw Kowalski <jarek@atm.com.pl>
+
+	* Microsoft.CSharp/CSharpCodeGenerator.cs:
+	
+	  - fixed support for method references where target
+		object is null
+	  - fixed CodeThrowExceptionStatement
+	  - disabled member access modifiers for private method
+	    implementations
+	  - disabled generation of empty method body for interface
+	    declarations
+	  - disabled generation of empty property accessor bodies
+	    in interface declarations
+	  - added support for indexers (properties named "Item")
+	  - added support for chained constructor arguments and
+	    base constructor arguments
+
+	* System.CodeDom/CodeTypeDeclaration.cs:
+
+	  - TypeAttributes of CodeTypeDeclaration now defaults to
+	    TypeAttributes.Public (same as MS implementation)
+
 2003-07-27  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
 
 	* System.dll.sources: SRDescriptionAttribute.cs moved
Index: Microsoft.CSharp/CSharpCodeGenerator.cs
===================================================================
RCS file: /mono/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs,v
retrieving revision 1.9
diff -u -r1.9 CSharpCodeGenerator.cs
--- Microsoft.CSharp/CSharpCodeGenerator.cs	7 Aug 2003 22:24:27 -0000	1.9
+++ Microsoft.CSharp/CSharpCodeGenerator.cs	15 Aug 2003 22:33:14 -0000
@@ -202,8 +202,11 @@
 
 		protected override void GenerateMethodReferenceExpression( CodeMethodReferenceExpression expression )
 		{
-			GenerateExpression( expression.TargetObject );
-			Output.Write( '.' );
+			if (expression.TargetObject != null)
+			{
+				GenerateExpression( expression.TargetObject );
+				Output.Write( '.' );
+			};
 			Output.Write( GetSafeName (expression.MethodName) );
 		}
 
@@ -271,6 +274,7 @@
 		{
 			Output.Write( "throw " );
 			GenerateExpression( statement.ToThrow );
+			Output.WriteLine(";");
 		}
 
 		protected override void GenerateComment( CodeComment comment )
@@ -497,7 +501,10 @@
 
 			MemberAttributes attributes = method.Attributes;
 
-			OutputMemberAccessModifier( attributes );
+			if (method.PrivateImplementationType == null)
+			{
+				OutputMemberAccessModifier( attributes );
+			};
 			OutputMemberScopeModifier( attributes );
 
 			OutputType( method.ReturnType );
@@ -515,7 +522,7 @@
 			OutputParameters( method.Parameters );
 			output.Write( ')' );
 
-			if ( (attributes & MemberAttributes.ScopeMask) == MemberAttributes.Abstract )
+			if ( (attributes & MemberAttributes.ScopeMask) == MemberAttributes.Abstract || declaration.IsInterface)
 				output.WriteLine( ';' );
 			else {
 				output.WriteLine( " {" );
@@ -538,30 +545,50 @@
 			OutputMemberAccessModifier( attributes );
 			OutputMemberScopeModifier( attributes );
 
-			OutputTypeNamePair( property.Type, GetSafeName (property.Name));
+			if (property.Name == "Item")
+			{
+				// indexer
+				
+				OutputTypeNamePair( property.Type, "this");
+				output.Write("[");
+				OutputParameters(property.Parameters);
+				output.Write("]");
+			}
+			else
+			{
+				OutputTypeNamePair( property.Type, GetSafeName (property.Name));
+			}
 			output.WriteLine (" {");
 			++Indent;
 
-			if (property.HasGet)
+			if (declaration.IsInterface)
 			{
-				output.WriteLine ("get {");
-				++Indent;
-
-				GenerateStatements (property.GetStatements);
-
-				--Indent;
-				output.WriteLine ("}");
+				if (property.HasGet) output.WriteLine("get; ");
+				if (property.HasSet) output.WriteLine("set; ");
 			}
-			
-			if (property.HasSet)
+			else
 			{
-				output.WriteLine ("set {");
-				++Indent;
-
-				GenerateStatements (property.SetStatements);
-
-				--Indent;
-				output.WriteLine ("}");
+				if (property.HasGet)
+				{
+					output.WriteLine ("get {");
+					++Indent;
+
+					GenerateStatements (property.GetStatements);
+
+					--Indent;
+					output.WriteLine ("}");
+				}
+
+				if (property.HasSet)
+				{
+					output.WriteLine ("set {");
+					++Indent;
+
+					GenerateStatements (property.SetStatements);
+
+					--Indent;
+					output.WriteLine ("}");
+				}
 			}
 
 			--Indent;
@@ -574,7 +601,36 @@
 			OutputMemberAccessModifier (constructor.Attributes);
 			Output.Write (GetSafeName (CurrentTypeName) + " (");
 			OutputParameters (constructor.Parameters);
-			Output.WriteLine (") {");
+			Output.Write (") ");
+			if (constructor.ChainedConstructorArgs.Count > 0)
+			{
+				Output.Write(": this(");
+				bool first = true;
+				foreach (CodeExpression ex in constructor.ChainedConstructorArgs)
+				{
+					if (!first)
+						Output.Write(", ");
+					first = false;
+					GenerateExpression(ex);
+				}
+				
+				Output.Write(") ");
+			};
+ 			if (constructor.BaseConstructorArgs.Count > 0)
+			{
+				Output.Write(": base(");
+				bool first = true;
+				foreach (CodeExpression ex in constructor.BaseConstructorArgs)
+				{
+					if (!first)
+						Output.Write(", ");
+					first = false;
+					GenerateExpression(ex);
+				}
+				
+				Output.Write(") ");
+			};
+			Output.WriteLine ("{");
 			Indent++;
 			GenerateStatements (constructor.Statements);
 			Indent--;
Index: System.CodeDom/CodeTypeDeclaration.cs
===================================================================
RCS file: /mono/mcs/class/System/System.CodeDom/CodeTypeDeclaration.cs,v
retrieving revision 1.5
diff -u -r1.5 CodeTypeDeclaration.cs
--- System.CodeDom/CodeTypeDeclaration.cs	28 May 2002 06:59:57 -0000	1.5
+++ System.CodeDom/CodeTypeDeclaration.cs	15 Aug 2003 22:33:14 -0000
@@ -21,7 +21,7 @@
 	{
 		private CodeTypeReferenceCollection baseTypes;
 		private CodeTypeMemberCollection members;
-		private TypeAttributes typeAttributes;
+		private TypeAttributes typeAttributes = TypeAttributes.Public;
 		private bool isEnum;
 		private bool isStruct;
 
