Bug 611 - Casting an addressof expression causes internal compiler error
Summary: Casting an addressof expression causes internal compiler error
Alias: None
Product: Compilers
Classification: Mono
Component: VisualBasic ()
Version: unspecified
Hardware: All All
: --- minor
Target Milestone: ---
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2011-09-02 19:09 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2018-05-22 11:52 UTC (History)
1 user (show)

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

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:

Description Rolf Bjarne Kvinge [MSFT] 2011-09-02 19:09:02 UTC
Test case:

public class c
	public shared sub Main
		dim o
		o = ctype (addressof main, asynccallback)
	end sub
end class

Results in:

/Users/rolf/test/test.vb (4,12) : Error VBNC99999: Internal compiler error close to this location
Error : VBNC99999: Unexpected error: There has been an internal error in the compiler: 'Use the other overload.' caused by the line: (4,23)
  at vbnc.Expression.ReclassifyToValueExpression () [0x0012a] in /private/tmp/monobuild/build/BUILD/mono-basic-2.10/vbnc/vbnc/source/Expressions/Expression.vb:443 
  at vbnc.Helper.VerifyValueClassification (vbnc.Expression& Expression, vbnc.ResolveInfo Info) [0x00035] in /private/tmp/monobuild/build/BUILD/mono-basic-2.10/vbnc/vbnc/source/General/Helper.vb:286 
  at vbnc.ConversionExpression.ResolveExpressionInternal (vbnc.ResolveInfo Info) [0x00064] in /private/tmp/monobuild/build/BUILD/mono-basic-2.10/vbnc/vbnc/source/Expressions/Conversions/ConversionExpression.vb:137 
  at vbnc.CTypeExpression.ResolveExpressionInternal (vbnc.ResolveInfo Info) [0x00056] in /private/tmp/monobuild/build/BUILD/mono-basic-2.10/vbnc/vbnc/source/Expressions/Conversions/CTypeExpression.vb:372 
  at vbnc.Expression.ResolveExpression (vbnc.ResolveInfo ResolveInfo) [0x00011] in /private/tmp/monobuild/build/BUILD/mono-basic-2.10/vbnc/vbnc/source/Expressions/Expression.vb:221 
Compilation took 00:00:00.6877280
Comment 1 Rolf Bjarne Kvinge [MSFT] 2018-05-22 11:52:37 UTC
Moved to: https://github.com/mono/mono-basic/issues/20