57 references to WRN_IsAlwaysFalse
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Operators.cs (2)
3262
Error(diagnostics, ErrorCode.
WRN_IsAlwaysFalse
, node, targetType);
3329
ErrorCode errorCode = constantValue == ConstantValue.True ? ErrorCode.WRN_IsAlwaysTrue : ErrorCode.
WRN_IsAlwaysFalse
;
Errors\ErrorFacts.cs (2)
319
case ErrorCode.
WRN_IsAlwaysFalse
:
706
case ErrorCode.
WRN_IsAlwaysFalse
:
Generated\ErrorFacts.Generated.cs (1)
21
case ErrorCode.
WRN_IsAlwaysFalse
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (17)
CodeGen\CodeGenOperators.cs (17)
608
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is string").WithArguments("string"));
641
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is color").WithArguments("color"));
673
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "default(color) is int").WithArguments("int"));
703
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is double").WithArguments("double"));
738
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1.0 is int").WithArguments("int"),
741
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1.0 is float").WithArguments("float"),
744
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is byte").WithArguments("byte"));
822
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v0 is ushort?").WithArguments("ushort?"),
823
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v1 is short?").WithArguments("short?"),
824
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v2 is short?").WithArguments("short?"),
825
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v3 is int?").WithArguments("int?"),
826
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v4 is int?").WithArguments("int?"),
827
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v5 is long?").WithArguments("long?"),
828
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v6 is long?").WithArguments("long?"),
829
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v7 is float?").WithArguments("float?"),
830
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v8 is float?").WithArguments("float?"),
831
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v9 is int?").WithArguments("int?")
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (7)
Semantics\PatternMatchingTests.cs (7)
116
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "x is bool").WithArguments("bool"),
3116
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1L is string").WithArguments("string").WithLocation(7, 27),
3119
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is int[]").WithArguments("int[]").WithLocation(8, 27),
6027
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is string").WithArguments("string").WithLocation(8, 13),
6033
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is long").WithArguments("long").WithLocation(14, 13),
6300
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, @"Console.Write(""Hello"") is object").WithArguments("object").WithLocation(6, 13)
6440
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is string").WithArguments("string").WithLocation(7, 13),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IIsTypeExpression.cs (2)
147
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is TestType").WithArguments("TestIsOperator.TestType").WithLocation(14, 32)
178
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is color").WithArguments("color").WithLocation(6, 27)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
Semantics\NullableReferenceTypesTests.cs (4)
3633
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null! is object").WithArguments("object").WithLocation(9, 13),
3808
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is object").WithArguments("object").WithLocation(7, 13),
3811
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null! is object").WithArguments("object").WithLocation(8, 13),
52360
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is string").WithArguments("string").WithLocation(6, 13)
Semantics\OperatorTests.cs (14)
5537
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "Main() is T").WithArguments("T"));
5647
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "c2 is Outer<long>.C").WithArguments("Outer<long>.C").WithLocation(16, 13),
5656
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s2 is Outer<long>.S").WithArguments("Outer<long>.S").WithLocation(24, 13),
5665
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "e2 is Outer<long>.E").WithArguments("Outer<long>.E").WithLocation(32, 13));
5684
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "c is int").WithArguments("int").WithLocation(6, 16)
5772
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "0 is Enum").WithArguments("System.Enum").WithLocation(13, 13),
5775
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is Enum").WithArguments("System.Enum").WithLocation(14, 13),
5946
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "numeral is Goo").WithArguments("Goo"),
5949
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is Bar").WithArguments("Bar"),
5952
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "numeral is Goo2").WithArguments("Goo2"));
5982
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is C").WithArguments("C"));
6009
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "e is IntPtr").WithArguments("System.IntPtr"),
11306
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is ValueTuple<long, int>").WithArguments("(long, int)").WithLocation(7, 13),
11309
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is ValueTuple<short, int>").WithArguments("(short, int)").WithLocation(8, 13),
Semantics\SpanStackSafetyTests.cs (2)
245
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "o is Span<int>").WithArguments("System.Span<int>").WithLocation(7, 13),
291
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is object").WithArguments("object").WithLocation(7, 13),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\ConversionTests.cs (2)
976
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "a is B").WithArguments("B"),
978
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "b is A").WithArguments("A"));
Symbols\MissingSpecialMember.cs (1)
2173
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "x is bool").WithArguments("bool").WithLocation(16, 38),
Symbols\SymbolErrorTests.cs (3)
13262
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is C").WithArguments("C").WithLocation(14, 11),
13268
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is C").WithArguments("C").WithLocation(15, 11),
13274
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, @"""a"" is C").WithArguments("C").WithLocation(16, 11)