https://bugzilla.novell.com/show_bug.cgi?id=335946
Summary: [GMCS] Unable to handle ternary operator in using ()
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
Found By: ---
Test case -
using System;
using System.IO;
public class test
{
public static void Main ()
{
bool use_stream = false;
StreamReader fs = new StreamReader ("/tmp/foo");
using (use_stream ? fs : null) {
Console.WriteLine ("hello");
}
}
}
mcs compiles this file, but gmcs gives
bug.cs(10,40): error CS1002: Expecting `;'
Compilation failed: 1 error(s), 0 warnings
Compiles fine with csc.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs