changeset 642:307ae566885f

Make default argument protection check not error for undefined protection. Fix symbol visibility issues in Tango.
author Christian Kamm <kamm incasoftware de>
date Fri, 03 Oct 2008 17:31:16 +0200
parents d9927f20758b
children 2a0bcf7f7b3d
files dmd/mtype.c runtime/llvmdc.diff
diffstat 2 files changed, 62 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/mtype.c	Fri Oct 03 09:11:41 2008 +0200
+++ b/dmd/mtype.c	Fri Oct 03 17:31:16 2008 +0200
@@ -2939,7 +2939,7 @@
 		// this check only catches the common case that the default arg Exp is a VarExp
 		if(arg->defaultArg->op == TOKvar)
 		{   VarExp *ve = (VarExp *)arg->defaultArg;
-		    if(ve->var->protection < sc->protection)
+		    if(ve->var->protection != PROTundefined && ve->var->protection < sc->protection)
 			error(loc, "default argument %s has stronger protection than function %s", ve->var->toChars(), toChars());
 		}
 	    }
--- a/runtime/llvmdc.diff	Fri Oct 03 09:11:41 2008 +0200
+++ b/runtime/llvmdc.diff	Fri Oct 03 17:31:16 2008 +0200
@@ -12,6 +12,28 @@
      static int opApply( int delegate( inout ModuleInfo ) );
  }
  
+Index: lib/common/tango/core/Exception.d
+===================================================================
+--- lib/common/tango/core/Exception.d	(revision 3954)
++++ lib/common/tango/core/Exception.d	(working copy)
+@@ -223,7 +223,7 @@
+ /**
+  * The basic exception thrown by the tango.io.vfs package.
+  */
+-private class VfsException : IOException
++class VfsException : IOException
+ {
+     this( char[] msg )
+     {
+@@ -234,7 +234,7 @@
+ /**
+  * The basic exception thrown by the tango.io.cluster package.
+  */
+-private class ClusterException : IOException
++class ClusterException : IOException
+ {
+     this( char[] msg )
+     {
 Index: lib/common/tango/core/BitManip.d
 ===================================================================
 --- lib/common/tango/core/BitManip.d	(revision 3954)
@@ -342,6 +364,19 @@
                          int[64] intargs = void;
                          byte[64] byteargs = void;
                          long[64] longargs = void;
+Index: tango/io/vfs/model/Vfs.d
+===================================================================
+--- tango/io/vfs/model/Vfs.d	(revision 3954)
++++ tango/io/vfs/model/Vfs.d	(working copy)
+@@ -38,7 +38,7 @@
+ 
+ *******************************************************************************/
+ 
+-private struct VfsStats
++struct VfsStats
+ {
+         ulong   bytes;                  // byte count of files
+         uint    files,                  // number of files
 Index: tango/core/Vararg.d
 ===================================================================
 --- tango/core/Vararg.d	(revision 3954)
@@ -722,3 +757,29 @@
  else
  {
      alias void* va_list;
+Index: tango/util/log/Log.d
+===================================================================
+--- tango/util/log/Log.d	(revision 3954)
++++ tango/util/log/Log.d	(working copy)
+@@ -1275,7 +1275,7 @@
+ 
+ *******************************************************************************/
+ 
+-private struct LogEvent
++struct LogEvent
+ {
+         private char[]          msg_,
+                                 name_;
+Index: tango/time/chrono/GregorianBased.d
+===================================================================
+--- tango/time/chrono/GregorianBased.d	(revision 3954)
++++ tango/time/chrono/GregorianBased.d	(working copy)
+@@ -21,7 +21,7 @@
+ 
+ 
+ 
+-private class GregorianBased : Gregorian {
++class GregorianBased : Gregorian {
+ 
+   private EraRange[] eraRanges_;
+   private int maxYear_, minYear_;