Bugzilla – Bug 319155
[GMCS][MERGE] crashes if a method is referred as a property
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by duncan@ximian.com 2005-09-29 23:57:41 MST ---- Expected: Z:\>csc a.cs Microsoft (R) Visual C# 2005 Compiler version 8.00.50215.44 for Microsoft (R) Windows (R) 2005 Framework version 2.0.50215 Copyright (C) Microsoft Corporation 2001-2005. All rights reserved. Z:\a.cs(14,17): error CS0446: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? Actual: diphthong:/tmp $ gmcs a.cs Exception caught by the compiler while compiling: Block that caused the problem begin at: a.cs(6,21): Block being compiled: [Internal(1,1):,Internal(1,1):] System.NullReferenceException: Object reference not set to an instance of an object Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0x000ea> Mono.CSharp.Foreach:Resolve (Mono.CSharp.EmitContext ec) in <0x001b6> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec) in <0x001b6> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec) in <0x001b6> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec) in <0x001b6> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec) in <0x00122> Mono.CSharp.EmitContext:ResolveTopBlock (Mono.CSharp.EmitContext anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.InternalParameters ip, IMethodData md, System.Boolean unreachable) ---- Additional Comments From duncan@ximian.com 2005-09-29 23:58:23 MST ---- Created an attachment (id=168605) a.cs ---- Additional Comments From marek.safar@seznam.cz 2005-09-30 03:20:54 MST ---- Should be already fixed in mcs. We need to integrate mcs -> gmcs ---- Additional Comments From marek.safar@seznam.cz 2005-10-05 04:54:43 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO76333 has been marked as a duplicate of this bug. *** ---- Additional Comments From miguel@ximian.com 2005-10-06 20:45:21 MST ---- The patch has been merged, closing bug. Imported an attachment (id=168605) Unknown operating system unknown. Setting to default OS "Other".