Author: gert
Date: 2007-10-16 08:26:10 -0400 (Tue, 16 Oct 2007)
New Revision: 87580

Added:
   trunk/gert/standalone/bug332532/
   trunk/gert/standalone/bug332532/default.build
   trunk/gert/standalone/bug332532/test.cs
Modified:
   trunk/gert/standalone/known-issues
Log:
Added test for bug #332532.


Added: trunk/gert/standalone/bug332532/default.build
===================================================================
--- trunk/gert/standalone/bug332532/default.build       2007-10-16 12:19:34 UTC 
(rev 87579)
+++ trunk/gert/standalone/bug332532/default.build       2007-10-16 12:26:10 UTC 
(rev 87580)
@@ -0,0 +1,50 @@
+<project name="bug332532" default="rebuild">
+       <target name="mono-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+       </target>
+
+       <target name="net-2.0">
+               <property name="csc.defines" 
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+       </target>
+
+       <property name="frameworks" value="mono-2.0,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="build">
+               <property name="original.targetframework" 
value="${nant.settings.currentframework}" />
+
+               <foreach property="framework" item="String" in="${frameworks}" 
delim=",">
+                       <if test="${framework::exists(framework)}">
+                               <property name="nant.settings.currentframework" 
value="${framework}" />
+                               <call 
target="${nant.settings.currentframework}" />
+                               <call target="run" />
+                               <call target="clean" />
+                       </if>
+               </foreach>
+
+               <property name="nant.settings.currentframework" 
value="${original.targetframework}" />
+       </target>
+
+       <target name="compile">
+               <csc target="exe" define="${csc.defines}" output="test.exe" 
warnaserror="true" warninglevel="4">
+                       <sources>
+                               <include name="test.cs" />
+                       </sources>
+               </csc>
+       </target>
+
+       <target name="run" depends="compile">
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}" />
+       </target>
+
+       <target name="rebuild" depends="clean, build" />
+</project>


Property changes on: trunk/gert/standalone/bug332532/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/standalone/bug332532/test.cs
===================================================================
--- trunk/gert/standalone/bug332532/test.cs     2007-10-16 12:19:34 UTC (rev 
87579)
+++ trunk/gert/standalone/bug332532/test.cs     2007-10-16 12:26:10 UTC (rev 
87580)
@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+
+class Test
+{
+       delegate T Creator<T> ();
+
+       static bool TryAction<T> (Creator<T> creator, out T output)
+       {
+               output = default (T);
+               return false;
+       }
+
+       static bool Func1<T> (IList<T> list, bool arg, out T value) where T : 
new ()
+       {
+               return TryAction<T> (delegate { return Item (list); }, out 
value);
+       }
+
+       public static T Item<T> (IList<T> list)
+       {
+               return GetSingleItem<T> (list);
+       }
+
+       public static T GetSingleItem<T> (IList<T> list)
+       {
+               return default (T);
+       }
+
+       public static void Main ()
+       {
+               Test value;
+               Func1 (new List<Test> (), false, out value);
+       }
+}


Property changes on: trunk/gert/standalone/bug332532/test.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/gert/standalone/known-issues
===================================================================
--- trunk/gert/standalone/known-issues  2007-10-16 12:19:34 UTC (rev 87579)
+++ trunk/gert/standalone/known-issues  2007-10-16 12:26:10 UTC (rev 87580)
@@ -92,6 +92,7 @@
 bug332206/**
 bug332409/**
 bug332425/**
+bug332532/**
 bug333342/**
 bug333686/**
 bug334173/**

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to