Open mavasani opened 5 years ago
Tagging @333fred @AlekseyTs
@mavasani Is this a regression? Do you have any idea what have changed?
@AlekseyTs I am not sure if this a regression. However, I have been able to run all IDE analyzers on entire Roslyn.sln in past using the same AnalyzerRunner tool/steps above. So it seems likely that it is a regression, but I can't be 100% sure.
Since you have a repro, could you narrow it down to a stand alone unit-test?
@AlekseyTs
<CompilerTrait(CompilerFeature.IOperation)>
<Fact>
Public Sub TestBoundTypeArgument()
Dim source = <![CDATA[
Option Strict On
Imports System.Runtime.CompilerServices
Class A
End Class
Class Derived1
Inherits A
End Class
Class Derived2
Inherits A
End Class
Class C
Public Function M(node As Object) As A
Return If(node.ExtensionMethod(Of Derived1), DirectCast(node.ExtensionMethod(Of Derived2)(), A)) 'BIND:"Return If(node.ExtensionMethod(Of Derived1), DirectCast(node.ExtensionMethod(Of Derived2)(), A))"
End Function
End Class
]]>.Value
' TODO: Baseline to be generated
Dim expectedOperationTree = <![CDATA[
]]>.Value
Dim expectedDiagnostics = String.Empty
VerifyOperationTreeAndDiagnosticsForTest(Of ReturnStatementSyntax)(source, expectedOperationTree, expectedDiagnostics)
End Sub
@AlekseyTs @333fred - By the way, to reproduce this I attempted to locally run the compiler unit tests with ROSLYN_TEST_IOPERATION=true
, and I see large of asserts and exceptions in the unit tests, most of them seem to be related to nullable types, symbol with annotations, etc.
@333fred - anything blocking https://github.com/dotnet/roslyn/pull/31724 to enable the new test leg for this?
@mavasani mainly that enabling the hook on all tests was causing timeouts for the leg.
\src\Tools\AnalyzerRunner\AnalyzerRunner.csproj
(you might have to manually apply the work around in https://github.com/dotnet/roslyn/issues/35812 before building)$(RepoRoot)\artifacts\bin\AnalyzerRunner\Release\net472
AnalyzerRunner.exe . $(RepoRoot)\Compilers.sln /concurrent
Exception thrown in VisualBasicOperationFactory here for unhandled BoundKind.TypeArguments