Bug 319155 (MONO76287) - [GMCS][MERGE] crashes if a method is referred as a property
Summary: [GMCS][MERGE] crashes if a method is referred as a property
Status: RESOLVED FIXED
Alias: MONO76287
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-30 06:57 UTC by Duncan Mak
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
a.cs (614 bytes, text/plain)
2005-09-30 06:58 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:33:01 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".