dotnet/roslyn

NRE from Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.GenerateConstructorAsync

开放

#55,731 创建于 2021年8月19日

 (1 条评论) (0 个反应) (1 位负责人)C# (4,257 个派生)batch import
Area-IDEBughelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

While editing in Roslyn.sln

System.ArgumentNullException : Value cannot be null.
Parameter name: node
   at Microsoft.CodeAnalysis.VisualBasic.VBSemanticModel.CheckSyntaxNode(VisualBasicSyntaxNode node)
   at Microsoft.CodeAnalysis.VisualBasic.SyntaxTreeSemanticModel.ClassifyConversion(ExpressionSyntax expression,ITypeSymbol destination)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicExtensions.ClassifyConversion(SemanticModel semanticModel,ExpressionSyntax expression,ITypeSymbol destination)
   at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSemanticFactsService.ClassifyConversion(SemanticModel semanticModel,SyntaxNode expression,ITypeSymbol destination)
   at Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.GenerateConstructorHelpers.IsCompatible[TExpressionSyntax](ISemanticFactsService semanticFacts,SemanticModel semanticModel,IMethodSymbol constructor,ImmutableArray`1 expressions)
   at Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.GenerateConstructorHelpers.CanDelegateTo[TExpressionSyntax](SemanticDocument document,ImmutableArray`1 parameters,ImmutableArray`1 expressions,IMethodSymbol constructor)
   at Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.State.FindConstructorToDelegateTo(ImmutableArray`1 parameters,ImmutableArray`1 expressions,ImmutableArray`1 constructors,CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.State.FindConstructorToDelegateTo(ImmutableArray`1 allParameters,ImmutableArray`1 allExpressions,CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.State.TryInitializeDelegatedConstructor(CancellationToken cancellationToken)
   at async Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.State.TryInitializeAsync[TService,TExpressionSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.State.GenerateAsync[TService,TExpressionSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.GenerateMember.GenerateConstructor.AbstractGenerateConstructorService`2.GenerateConstructorAsync[TService,TExpressionSyntax](<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.CodeFixes.GenerateMember.AbstractGenerateMemberCodeFixProvider.RegisterCodeFixesAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformActionAsync(<Unknown Parameters>)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

贡献者指南