Bug 2082 - Bug 730565 - CS0584: Internal compiler error while building expression trees containing either MemberListBinding or MemberMemberBinding
Summary: Bug 730565 - CS0584: Internal compiler error while building expression trees ...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2011-11-17 17:25 UTC by Giacomo Tesio
Modified: 2011-11-18 14:49 UTC (History)
1 user (show)

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


Attachments
A test that reproduce such compilation error. (947 bytes, text/x-csharp)
2011-11-17 17:25 UTC, Giacomo Tesio
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 Giacomo Tesio 2011-11-17 17:25:25 UTC
Created attachment 902 [details]
A test that reproduce such compilation error.

While building an expression tree containing a MemberListBinding or a
MemberMemberBinding the copiler produce the following error:

$ /opt/mono/bin/gmcs --stacktrace /noconfig "/out:/tmp/test/MonoBug/MonoBug/bin/Debug/MonoBug.dll" "/r:/opt/mono/lib/mono/2.0/System.dll" "/r:/usr/lib/cli/nunit.core-2.4/nunit.core.dll" "/r:/usr/lib/cli/nunit.framework-2.4/nunit.framework.dll" "/r:/opt/mono/lib/mono/2.0/System.Core.dll" /nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 "/define:DEBUG"  /t:library "/tmp/test/MonoBug/MonoBug/Test.cs" 


/tmp/test/MonoBug/MonoBug/Test.cs(14,83): error CS0584: Internal compiler error: Object reference not set to an instance of an object
	in ConsoleReportPrinter.Print (Mono.CSharp.AbstractMessage)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String, System.String)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.ResolveArrayElement (Mono.CSharp.ResolveContext, Mono.CSharp.Expression)
	in ArrayCreation.CheckIndices (Mono.CSharp.ResolveContext, Mono.CSharp.ArrayInitializer, System.Int32, System.Boolean, System.Int32)
	in ArrayCreation.ResolveInitializers (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location, System.Boolean)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversion (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversionRequired (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Assign.ResolveConversions (Mono.CSharp.ResolveContext)
	in Assign.DoResolve (Mono.CSharp.ResolveContext)
	in SimpleAssign.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext)
	in BlockVariableDeclaration.ResolveInitializer (Mono.CSharp.BlockContext, Mono.CSharp.LocalVariable, Mono.CSharp.Expression)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext, System.Boolean)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext)
	in Block.Resolve (Mono.CSharp.BlockContext)
	in ParametersBlock.Resolve (Mono.CSharp.FlowBranching, Mono.CSharp.BlockContext, Mono.CSharp.IMethodData)
	in MethodData.Emit (Mono.CSharp.DeclSpace)
	in MethodOrOperator.Emit ()
	in Method.Emit ()
	in TypeContainer.EmitType ()
	in ModuleContainer.Emit ()
	in AssemblyDefinition.Emit ()
	in AssemblyDefinitionStatic.Emit ()
	in Driver.Compile ()
	in Driver.Main (System.String[])

/tmp/test/MonoBug/MonoBug/Test.cs(14,83): error CS1502: The best overloaded method match for `System.Linq.Expressions.Expression.ListBind(System.Reflection.MemberInfo, params System.Linq.Expressions.ElementInit[])' has some invalid arguments
/opt/mono/lib/mono/2.0/System.Core.dll (Location of the symbol related to previous error)
	in ConsoleReportPrinter.Print (Mono.CSharp.AbstractMessage)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String, System.String)
	in OverloadResolver.ReportArgumentMismatch (Mono.CSharp.ResolveContext, System.Int32, Mono.CSharp.MemberSpec, Mono.CSharp.Argument, Mono.CSharp.AParametersCollection, Mono.CSharp.TypeSpec)
	in OverloadResolver.VerifyArguments (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&, Mono.CSharp.MemberSpec, Mono.CSharp.IParametersMember, System.Boolean)
	in OverloadResolver.ReportOverloadError (Mono.CSharp.ResolveContext, Mono.CSharp.MemberSpec, Mono.CSharp.IParametersMember, Mono.CSharp.Arguments, System.Boolean)
	in OverloadResolver.ResolveMember (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&)
	in MethodGroupExpr.OverloadResolve (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&, Mono.CSharp.OverloadResolver+IErrorHandler, Mono.CSharp.OverloadResolver+Restrictions)
	in Invocation.DoResolveOverload (Mono.CSharp.ResolveContext)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.ResolveArrayElement (Mono.CSharp.ResolveContext, Mono.CSharp.Expression)
	in ArrayCreation.CheckIndices (Mono.CSharp.ResolveContext, Mono.CSharp.ArrayInitializer, System.Int32, System.Boolean, System.Int32)
	in ArrayCreation.ResolveInitializers (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location, System.Boolean)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversion (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversionRequired (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Assign.ResolveConversions (Mono.CSharp.ResolveContext)
	in Assign.DoResolve (Mono.CSharp.ResolveContext)
	in SimpleAssign.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext)
	in BlockVariableDeclaration.ResolveInitializer (Mono.CSharp.BlockContext, Mono.CSharp.LocalVariable, Mono.CSharp.Expression)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext, System.Boolean)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext)
	in Block.Resolve (Mono.CSharp.BlockContext)
	in ParametersBlock.Resolve (Mono.CSharp.FlowBranching, Mono.CSharp.BlockContext, Mono.CSharp.IMethodData)
	in MethodData.Emit (Mono.CSharp.DeclSpace)
	in MethodOrOperator.Emit ()
	in Method.Emit ()
	in TypeContainer.EmitType ()
	in ModuleContainer.Emit ()
	in AssemblyDefinition.Emit ()
	in AssemblyDefinitionStatic.Emit ()
	in Driver.Compile ()
	in Driver.Main (System.String[])

/tmp/test/MonoBug/MonoBug/Test.cs(14,113): error CS0584: Internal compiler error: Object reference not set to an instance of an object
	in ConsoleReportPrinter.Print (Mono.CSharp.AbstractMessage)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String, System.String)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.ResolveArrayElement (Mono.CSharp.ResolveContext, Mono.CSharp.Expression)
	in ArrayCreation.CheckIndices (Mono.CSharp.ResolveContext, Mono.CSharp.ArrayInitializer, System.Int32, System.Boolean, System.Int32)
	in ArrayCreation.ResolveInitializers (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location, System.Boolean)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversion (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversionRequired (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Assign.ResolveConversions (Mono.CSharp.ResolveContext)
	in Assign.DoResolve (Mono.CSharp.ResolveContext)
	in SimpleAssign.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext)
	in BlockVariableDeclaration.ResolveInitializer (Mono.CSharp.BlockContext, Mono.CSharp.LocalVariable, Mono.CSharp.Expression)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext, System.Boolean)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext)
	in Block.Resolve (Mono.CSharp.BlockContext)
	in ParametersBlock.Resolve (Mono.CSharp.FlowBranching, Mono.CSharp.BlockContext, Mono.CSharp.IMethodData)
	in MethodData.Emit (Mono.CSharp.DeclSpace)
	in MethodOrOperator.Emit ()
	in Method.Emit ()
	in TypeContainer.EmitType ()
	in ModuleContainer.Emit ()
	in AssemblyDefinition.Emit ()
	in AssemblyDefinitionStatic.Emit ()
	in Driver.Compile ()
	in Driver.Main (System.String[])

/tmp/test/MonoBug/MonoBug/Test.cs(14,113): error CS1502: The best overloaded method match for `System.Linq.Expressions.Expression.ListBind(System.Reflection.MemberInfo, params System.Linq.Expressions.ElementInit[])' has some invalid arguments
/opt/mono/lib/mono/2.0/System.Core.dll (Location of the symbol related to previous error)
	in ConsoleReportPrinter.Print (Mono.CSharp.AbstractMessage)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String)
	in Report.Error (System.Int32, Mono.CSharp.Location, System.String, System.String)
	in OverloadResolver.ReportArgumentMismatch (Mono.CSharp.ResolveContext, System.Int32, Mono.CSharp.MemberSpec, Mono.CSharp.Argument, Mono.CSharp.AParametersCollection, Mono.CSharp.TypeSpec)
	in OverloadResolver.VerifyArguments (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&, Mono.CSharp.MemberSpec, Mono.CSharp.IParametersMember, System.Boolean)
	in OverloadResolver.ReportOverloadError (Mono.CSharp.ResolveContext, Mono.CSharp.MemberSpec, Mono.CSharp.IParametersMember, Mono.CSharp.Arguments, System.Boolean)
	in OverloadResolver.ResolveMember (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&)
	in MethodGroupExpr.OverloadResolve (Mono.CSharp.ResolveContext, Mono.CSharp.Arguments&, Mono.CSharp.OverloadResolver+IErrorHandler, Mono.CSharp.OverloadResolver+Restrictions)
	in Invocation.DoResolveOverload (Mono.CSharp.ResolveContext)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.ResolveArrayElement (Mono.CSharp.ResolveContext, Mono.CSharp.Expression)
	in ArrayCreation.CheckIndices (Mono.CSharp.ResolveContext, Mono.CSharp.ArrayInitializer, System.Int32, System.Boolean, System.Int32)
	in ArrayCreation.ResolveInitializers (Mono.CSharp.ResolveContext)
	in ImplicitlyTypedArrayCreation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Argument.Resolve (Mono.CSharp.ResolveContext)
	in Arguments.Resolve (Mono.CSharp.ResolveContext, System.Boolean&)
	in Invocation.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location, System.Boolean)
	in Convert.ImplicitConversionStandard (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversion (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Convert.ImplicitConversionRequired (Mono.CSharp.ResolveContext, Mono.CSharp.Expression, Mono.CSharp.TypeSpec, Mono.CSharp.Location)
	in Assign.ResolveConversions (Mono.CSharp.ResolveContext)
	in Assign.DoResolve (Mono.CSharp.ResolveContext)
	in SimpleAssign.DoResolve (Mono.CSharp.ResolveContext)
	in Expression.Resolve (Mono.CSharp.ResolveContext, Mono.CSharp.ResolveFlags)
	in Expression.Resolve (Mono.CSharp.ResolveContext)
	in ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext)
	in BlockVariableDeclaration.ResolveInitializer (Mono.CSharp.BlockContext, Mono.CSharp.LocalVariable, Mono.CSharp.Expression)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext, System.Boolean)
	in BlockVariableDeclaration.Resolve (Mono.CSharp.BlockContext)
	in Block.Resolve (Mono.CSharp.BlockContext)
	in ParametersBlock.Resolve (Mono.CSharp.FlowBranching, Mono.CSharp.BlockContext, Mono.CSharp.IMethodData)
	in MethodData.Emit (Mono.CSharp.DeclSpace)
	in MethodOrOperator.Emit ()
	in Method.Emit ()
	in TypeContainer.EmitType ()
	in ModuleContainer.Emit ()
	in AssemblyDefinition.Emit ()
	in AssemblyDefinitionStatic.Emit ()
	in Driver.Compile ()
	in Driver.Main (System.String[])
Comment 1 Marek Safar 2011-11-18 14:49:43 UTC
Fixed in master