AdamSpeight2008 / roslyn-AdamSpeight2008

The .NET Compiler Platform ("Roslyn") provides open-source C# and Visual Basic compilers with rich code analysis APIs.
MIT License
0 stars 0 forks source link

Highlighting a TypeArray throws an exception. #13

Open AdamSpeight2008 opened 7 years ago

AdamSpeight2008 commented 7 years ago

When I highlight the TypeArray {Integer, String}

Dim obj = 10
Dim result = TypeOf obj Is {Integer, String}

an exception is thrown.

   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.TypeParameterCollector.DefaultVisit(ISymbol node)
   at Microsoft.CodeAnalysis.SymbolVisitor.VisitTypeArray(ITypeArraySymbol symbol)
   at Microsoft.CodeAnalysis.VisualBasic.Symbols.TypeArraySymbol.Accept(SymbolVisitor visitor)
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.TypeParameterCollector.Collect(ITypeSymbol typeSymbol)
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.GetMethodTypeParametersInDeclaration(ITypeSymbol returnType, SortedDictionary`2 sortedMap)
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.<AnalyzeAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.<ExtractMethodAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.ExtractMethod.AbstractExtractMethodService`3.<ExtractMethodAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.<GetCodeActionAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.<ComputeRefactoringsAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<G
AdamSpeight2008 commented 7 years ago

Highlighting a TypeArray throws an exception.