[Mono-list] A compiler bug?
amartinez at atc.ugr.es
amartinez at atc.ugr.es
Sun Jun 19 03:38:36 EDT 2005
Hello!
Look for the comma ',' inserted in the code I append
(just next "cad1.Equals(cad2) +" in the seventh line).
I think it should be a parser error, shouldn't be? But the compiler
doesn't complain at all. The result with the comma is:
False,
and without the comma
False,False,True
I have probed this with mcs 1.1.8 and gmcs 1.1.5. The same output.
<code>
using System;
class X {
static void Main () {
string cad1 = "hello1";
string cad2 = "bye";
string cad3 = "hello1";
Console.WriteLine (cad1.Equals(cad2) + ",", + cad2.Equals(cad3) + "," +
cad1.Equals(cad3));
}
}
</code>
Thank you!
--
Antonio Martínez
More information about the Mono-list
mailing list