32 references to WRN_IsAlwaysTrue
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Operators.cs (1)
3329
ErrorCode errorCode = constantValue == ConstantValue.True ? ErrorCode.
WRN_IsAlwaysTrue
: ErrorCode.WRN_IsAlwaysFalse;
Errors\ErrorFacts.cs (2)
318
case ErrorCode.
WRN_IsAlwaysTrue
:
705
case ErrorCode.
WRN_IsAlwaysTrue
:
Generated\ErrorFacts.Generated.cs (1)
20
case ErrorCode.
WRN_IsAlwaysTrue
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTupleTest.cs (1)
25536
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "(1, 1) is System.Nullable<(int, int a)>").WithArguments("(int, int a)?").WithLocation(6, 18)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
FlowAnalysis\FlowTests.cs (1)
4386
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "(b && M0(x = y = 0)) is bool").WithArguments("bool").WithLocation(11, 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)
5650
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s1 is Outer<T>.S").WithArguments("Outer<T>.S").WithLocation(18, 13),
5653
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s2 is Outer<int>.S").WithArguments("Outer<int>.S").WithLocation(23, 13),
5659
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Outer<T>.E").WithArguments("Outer<T>.E").WithLocation(26, 13),
5662
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Outer<int>.E").WithArguments("Outer<int>.E").WithLocation(31, 13),
5715
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "s2 is Outer<T[]>.S").WithArguments("Outer<T[]>.S").WithLocation(11, 13));
5766
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Enum").WithArguments("System.Enum").WithLocation(11, 13),
5769
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Enum").WithArguments("System.Enum").WithLocation(12, 13),
5779
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is ValueType").WithArguments("System.ValueType").WithLocation(19, 13),
5782
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is ValueType").WithArguments("System.ValueType").WithLocation(20, 13),
5785
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "0 is ValueType").WithArguments("System.ValueType").WithLocation(21, 13),
5788
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "i is ValueType").WithArguments("System.ValueType").WithLocation(22, 13),
5791
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "ts is ValueType").WithArguments("System.ValueType").WithLocation(25, 13),
5795
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e1 is Object").WithArguments("object").WithLocation(27, 13),
5798
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "e2 is Object").WithArguments("object").WithLocation(28, 13),
5801
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "0 is Object").WithArguments("object").WithLocation(29, 13),
5804
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "i is Object").WithArguments("object").WithLocation(30, 13),
5807
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "ts is Object").WithArguments("object").WithLocation(33, 13));
11283
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "d is string").WithArguments("string").WithLocation(6, 17)
11312
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "t is ValueTuple<int, int>").WithArguments("(int, int)").WithLocation(9, 13)
Semantics\SemanticErrorTests.cs (2)
19212
new ErrorDescription { Code = (int)ErrorCode.
WRN_IsAlwaysTrue
, Line = 14, Column = 13, IsWarning = true });
22617
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)
2176
Diagnostic(ErrorCode.
WRN_IsAlwaysTrue
, "x is bool is bool").WithArguments("bool").WithLocation(16, 38),