[svn] r7462: nemerle/trunk/ncc/typing/Typer.n

nikov svnadmin at nemerle.org
Thu Feb 22 08:53:08 CET 2007


Log:
Fix bug 937.

Author: nikov
Date: Thu Feb 22 08:53:06 2007
New Revision: 7462

Modified:
   nemerle/trunk/ncc/typing/Typer.n

Modified: nemerle/trunk/ncc/typing/Typer.n
==============================================================================
--- nemerle/trunk/ncc/typing/Typer.n	(original)
+++ nemerle/trunk/ncc/typing/Typer.n	Thu Feb 22 08:53:06 2007
@@ -785,12 +785,16 @@
           CanBeTypeName (expr1) && CanBeTypeName (expr2)
         
         | <[ @* (.. $exprs) ]> => 
-          if (exprs.Exists ( _ is <[ void ]> )) {
+          if (exprs.ForAll (e => e is <[ void ]> || CanBeTypeName(e))) {
+            if (exprs.Exists (_ is <[ void ]>)) {
+              // It looks like a tuple, but in current implementation of .NET void cannot be a generic argument.
+              // So, we return true, but issue an error. It looks like the suitable decision here (FIXME).
             Message.Error (expr.Location, $"$expr is not a valid type. Tuple cannot have void elements.");
             true
           }
-          else
-            exprs.ForAll (CanBeTypeName)
+            else true
+          }
+          else false
 
         | _ => false
       }



More information about the svn mailing list