70 references to ERR_TypeMismatch2
Microsoft.CodeAnalysis.VisualBasic (20)
Binding\Binder_Conversions.vb (3)
1748
ReportDiagnostic(diagnostics, location, ERRID.
ERR_TypeMismatch2
, sourceType, targetType)
1765
ReportDiagnostic(diagnostics, location, ERRID.
ERR_TypeMismatch2
, sourceType, targetType)
1789
ReportDiagnostic(diagnostics, location, ERRID.
ERR_TypeMismatch2
, sourceType, targetType)
Errors\ErrorFacts.vb (1)
249
ERRID.
ERR_TypeMismatch2
,
Preprocessor\ExpressionEvaluator.vb (16)
435
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr.Type, value.SpecialType.GetDisplayName(), specialType.GetDisplayName())
464
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr.Type, val.SpecialType, specialType)
621
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, SpecialType.System_Char.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName())
623
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, SpecialType.System_DateTime.GetDisplayName(), SpecialType.System_Boolean.GetDisplayName())
633
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, specialType, SpecialType.System_Boolean.GetDisplayName())
668
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, SpecialType.System_Char.GetDisplayName(), toSpecialType.GetDisplayName())
671
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, SpecialType.System_DateTime.GetDisplayName(), toSpecialType.GetDisplayName())
680
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType.GetDisplayName(), toSpecialType.GetDisplayName())
741
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName())
744
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName())
759
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_Char.GetDisplayName())
774
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName())
779
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName())
782
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName())
795
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, fromSpecialType, SpecialType.System_DateTime.GetDisplayName())
832
Return ReportSemanticError(ERRID.
ERR_TypeMismatch2
, expr, specialType, SpecialType.System_String.GetDisplayName())
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\OptionalArgumentsTests.vb (1)
1248
comp.VerifyDiagnostics(Diagnostic(ERRID.
ERR_TypeMismatch2
, "IntegerWithDateTimeOptionalValue()").WithArguments("Date", "Integer"))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (48)
Binding\BindingErrorTests.vb (5)
4879
</compilation>).VerifyDiagnostics(Diagnostic(ERRID.
ERR_TypeMismatch2
, "at2").WithArguments("<anonymous type: f2 As String, f1 As Object>", "<anonymous type: f1 As Object, f2 As String>"))
5143
Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1, 2, 3}").WithArguments("Integer()", "System.Collections.Generic.List(Of Integer)"))
5158
CompilationUtils.CreateCompilationWithMscorlib40AndVBRuntime(source).VerifyDiagnostics(Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1, 2, 3}").WithArguments("Integer()", "System.Collections.Generic.List(Of Integer)"))
14046
Diagnostic(ERRID.
ERR_TypeMismatch2
, "New Action(AddressOf Me.Foo)").WithArguments("System.Action", "C1.xEventHandler"),
14048
Diagnostic(ERRID.
ERR_TypeMismatch2
, "New Action(AddressOf Me.Foo)").WithArguments("System.Action", "C1.xEventHandler"))
Diagnostics\OperationAnalyzerTests.vb (1)
1749
Diagnostic(ERRID.
ERR_TypeMismatch2
, "10", New Object() {"Integer", "B2"}).WithLocation(23, 17),
Semantics\ArrayLiteralTests.vb (4)
341
Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1}").WithArguments("Integer()", "Module1.C"),
342
Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1}").WithArguments("Integer()", "Module1.C"))
346
Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1}").WithArguments("Integer()", "Module1.C"),
347
Diagnostic(ERRID.
ERR_TypeMismatch2
, "{1}").WithArguments("Integer()", "Module1.C"))
Semantics\Conversions.vb (37)
2792
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2793
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2794
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
2795
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
2843
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2844
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2845
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
2846
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
2897
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2898
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
2899
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
2900
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
3047
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Int64.MaxValue").WithArguments("Long", "Integer"),
3048
Diagnostic(ERRID.
ERR_TypeMismatch2
, "System.Double.MaxValue").WithArguments("Double", "Decimal"),
3049
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
3050
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
3060
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char"),
3061
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Ch").WithArguments("Char", "String"),
3062
Diagnostic(ERRID.
ERR_TypeMismatch2
, "ChArray").WithArguments("Char()", "String"),
3063
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char()"),
3067
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Si").WithArguments("Single", "Double"))
3084
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Int64.MaxValue").WithArguments("Long", "Integer"),
3085
Diagnostic(ERRID.
ERR_TypeMismatch2
, "System.Double.MaxValue").WithArguments("Double", "Decimal"),
3086
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Da").WithArguments("Date", "Integer"),
3087
Diagnostic(ERRID.
ERR_TypeMismatch2
, "[In]").WithArguments("Integer", "Date"),
3097
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char"),
3098
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Ch").WithArguments("Char", "String"),
3099
Diagnostic(ERRID.
ERR_TypeMismatch2
, "ChArray").WithArguments("Char()", "String"),
3100
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char()"),
3104
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Si").WithArguments("Single", "Double"))
3232
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Ch").WithArguments("Char", "String"),
3233
Diagnostic(ERRID.
ERR_TypeMismatch2
, "ChArray").WithArguments("Char()", "String"),
3234
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char()"),
3260
Diagnostic(ERRID.
ERR_TypeMismatch2
, "Ch").WithArguments("Char", "String"),
3261
Diagnostic(ERRID.
ERR_TypeMismatch2
, "ChArray").WithArguments("Char()", "String"),
3262
Diagnostic(ERRID.
ERR_TypeMismatch2
, "St").WithArguments("String", "Char()"),
4209
Diagnostic(ERRID.
ERR_TypeMismatch2
, "300").WithArguments("Integer", "Byte"))
Semantics\OptionalArgumentTests.vb (1)
166
comp.VerifyDiagnostics(Diagnostic(ERRID.
ERR_TypeMismatch2
, "1").WithArguments("Integer", "System.Guid"))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\ParseDirectives.vb (1)
3383
Diagnostic(ERRID.
ERR_TypeMismatch2
, "x").WithArguments("Integer", "System.Exception").WithLocation(5, 37))