Bug 5357 - Property setter with delegate causes Internal compiler error: Object reference not set to an instance of an object (CS0584)
Summary: Property setter with delegate causes Internal compiler error: Object referenc...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-05-26 18:53 UTC by Eric Smith
Modified: 2012-05-28 09:14 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Small test case (546 bytes, text/plain)
2012-05-26 18:53 UTC, Eric Smith
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Eric Smith 2012-05-26 18:53:21 UTC
Compiling the attached class, the compilation fails with the following error messages at line 18:

error CS0584: Internal compiler error: Object reference not set to an instance of an object
error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement


1) The problem first arose when I moved the "base.Text = value;" inside the delegate.  If that line is outside the delegate, it compiles fine.

2) Uncommenting the unused Junk() method makes the error go away.  Weird.
Comment 1 Eric Smith 2012-05-26 18:53:54 UTC
Created attachment 1967 [details]
Small test case
Comment 2 Marek Safar 2012-05-28 09:14:19 UTC
Already fixed in master