Skip to content

NRE in CSharpUseImplicitTypeHelper.AssignmentSupportsStylePreference #27221

@mavasani

Description

@mavasani

Got the following NRE while editing some broken code in Roslyn.sln, I don't have repro steps:

System.NullReferenceException : Object reference not set to an instance of an object.
   at Microsoft.CodeAnalysis.CSharp.Utilities.CSharpUseImplicitTypeHelper.AssignmentSupportsStylePreference(SyntaxToken identifier,TypeSyntax typeName,ExpressionSyntax initializer,SemanticModel semanticModel,OptionSet optionSet,CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Utilities.CSharpUseImplicitTypeHelper.TryAnalyzeVariableDeclaration(TypeSyntax typeName,SemanticModel semanticModel,OptionSet optionSet,CancellationToken cancellationToken)
   at async Microsoft.CodeAnalysis.CSharp.CodeRefactorings.UseType.AbstractUseTypeCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
   at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Metadata

Metadata

Assignees

Labels

Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comResolution-FixedThe bug has been fixed and/or the requested behavior has been implemented

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions