Bugzilla – Bug 319432
[GMCS] compiler error on &&
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by ats@cs.rit.edu 2005-10-29 16:27:02 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: file <http://www.cs.rit.edu/~ats/cs-2005-1/code/adt/array/Abuse.cs> draws CS0019. It compiles on VS 2005 beta 2. Steps to reproduce the problem: 1. gmcs /m:Axel.ADT.Array.AbuseTest Abuse.cs Container.cs ../IContainer.cs ../Test.cs 2. 3. Actual Results: Abuse.cs(78,48): error CS0019: Operator `&&' cannot be applied to operands of type `Axel.ADT.Array.Abuse<System.String>' and `Mono.CSharp.NullType' Expected Results: successful compilation How often does this happen? always Additional Information: The additional files 'live' above the link given above. ---- Additional Comments From miguel@ximian.com 2005-11-04 11:04:46 MST ---- Here is an actual simple test case instead of the mess provided before: class Abuse<T> {} class X { static int Main () { Abuse<string> a = new Abuse<string> (); if (a && null) return 1; return 0; } } There is a patch from mcs that I believe we need to port to gmcs and might eliminate this problem (the recent Null code from Marek). ---- Additional Comments From marek.safar@seznam.cz 2005-11-10 10:23:14 MST ---- Miguel, I tested your code with final version of csc 2. And it reports same error as we do. ---- Additional Comments From miguel@ximian.com 2005-12-30 15:52:10 MST ---- Thanks, am going to flag this as a NOTABUG. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Panther</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".