[Mono-bugs] [Bug 52611][Wis] New - test-53 is invalid

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 5 Jan 2004 16:13:19 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=52611

--- shadow/52611	2004-01-05 16:13:19.000000000 -0500
+++ shadow/52611.tmp.9603	2004-01-05 16:13:19.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 52611
+Product: Mono/Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: test-53 is invalid
+
+Test 53 for mcs is invalid.
+
+It involves a statement:
+
+		using (NoIDispose a = new NoIDispose ()){
+		}
+
+Where NoIDispose is not idisposable, but has an implicit coversion to a
+class that is.
+
+THe spec says:
+1 If the form of resource-acquisition is local-variable-declaration then
+the type of the local-variable-declaration must be System.IDisposable or a
+type that can be implicitly converted to System.IDisposable. 2 If the form
+of resource-acquisition is expression then this expression must be
+System.IDisposable or a type that can be implicitly converted to
+System.IDisposable. 
+
+Clause 2 does not allow multiple implicit conversions to be used (this
+could very well cause the compiler to go through a tedious process to
+resolve a class). We need not worry about a direct implict coversion to
+IDisposable, since that is not allowed.