34 references to WRN_IsAlwaysTrue
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Operators.cs (1)
4799
ErrorCode errorCode = constantValue == ConstantValue.True ? ErrorCode.
WRN_IsAlwaysTrue
: ErrorCode.WRN_IsAlwaysFalse;
Errors\ErrorFacts.cs (2)
331
case ErrorCode.
WRN_IsAlwaysTrue
:
766
or ErrorCode.
WRN_IsAlwaysTrue
Generated\ErrorFacts.Generated.cs (1)
20
case ErrorCode.
WRN_IsAlwaysTrue
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
25498
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "(1, 1) is System.Nullable<(int, int a)>").WithArguments("(int, int a)?").WithLocation(6, 18)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
FlowAnalysis\FlowTests.cs (1)
4387
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "(b && M0(x = y = 0)) is bool").WithArguments("bool").WithLocation(11, 13),
RefStructInterfacesTests.cs (2)
24275
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "h1 is T").WithArguments("T").WithLocation(7, 13),
24278
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "h2 is S").WithArguments("S").WithLocation(22, 13)
Semantics\PatternMatchingTests.cs (2)
119
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "x is bool is bool").WithArguments("bool")
3178
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, @"""goo"" is System.String").WithArguments("string").WithLocation(11, 27),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IIsTypeExpression.cs (1)
77
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "myInt is int").WithArguments("int").WithLocation(13, 32)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\OperatorTests.cs (19)
5651
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s1 is Outer<T>.S").WithArguments("Outer<T>.S").WithLocation(18, 13),
5654
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s2 is Outer<int>.S").WithArguments("Outer<int>.S").WithLocation(23, 13),
5660
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Outer<T>.E").WithArguments("Outer<T>.E").WithLocation(26, 13),
5663
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Outer<int>.E").WithArguments("Outer<int>.E").WithLocation(31, 13),
5716
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s2 is Outer<T[]>.S").WithArguments("Outer<T[]>.S").WithLocation(11, 13));
5767
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Enum").WithArguments("System.Enum").WithLocation(11, 13),
5770
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Enum").WithArguments("System.Enum").WithLocation(12, 13),
5780
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is ValueType").WithArguments("System.ValueType").WithLocation(19, 13),
5783
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is ValueType").WithArguments("System.ValueType").WithLocation(20, 13),
5786
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "0 is ValueType").WithArguments("System.ValueType").WithLocation(21, 13),
5789
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "i is ValueType").WithArguments("System.ValueType").WithLocation(22, 13),
5792
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "ts is ValueType").WithArguments("System.ValueType").WithLocation(25, 13),
5796
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Object").WithArguments("object").WithLocation(27, 13),
5799
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Object").WithArguments("object").WithLocation(28, 13),
5802
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "0 is Object").WithArguments("object").WithLocation(29, 13),
5805
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "i is Object").WithArguments("object").WithLocation(30, 13),
5808
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "ts is Object").WithArguments("object").WithLocation(33, 13));
11925
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "d is string").WithArguments("string").WithLocation(6, 17)
11954
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "t is ValueTuple<int, int>").WithArguments("(int, int)").WithLocation(9, 13)
Semantics\SemanticErrorTests.cs (2)
19436
new ErrorDescription { Code = (int)ErrorCode.
WRN_IsAlwaysTrue
, Line = 14, Column = 13, IsWarning = true });
22873
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "123 is dynamic").WithArguments("dynamic"),
Semantics\SpanStackSafetyTests.cs (1)
224
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s is Span<string>").WithArguments("System.Span<string>").WithLocation(5, 31));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\MissingSpecialMember.cs (1)
2206
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "x is bool is bool").WithArguments("bool").WithLocation(16, 38),