69 references to WRN_IsAlwaysFalse
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Operators.cs (2)
4732
Error(diagnostics, ErrorCode.
WRN_IsAlwaysFalse
, node, targetType);
4799
ErrorCode errorCode = constantValue == ConstantValue.True ? ErrorCode.WRN_IsAlwaysTrue : ErrorCode.
WRN_IsAlwaysFalse
;
Errors\ErrorFacts.cs (2)
332
case ErrorCode.
WRN_IsAlwaysFalse
:
767
or ErrorCode.
WRN_IsAlwaysFalse
Generated\ErrorFacts.Generated.cs (1)
21
case ErrorCode.
WRN_IsAlwaysFalse
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (17)
CodeGen\CodeGenOperators.cs (17)
605
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is string").WithArguments("string"));
638
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is color").WithArguments("color"));
670
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "default(color) is int").WithArguments("int"));
700
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is double").WithArguments("double"));
735
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1.0 is int").WithArguments("int"),
738
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1.0 is float").WithArguments("float"),
741
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is byte").WithArguments("byte"));
819
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v0 is ushort?").WithArguments("ushort?"),
820
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v1 is short?").WithArguments("short?"),
821
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v2 is short?").WithArguments("short?"),
822
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v3 is int?").WithArguments("int?"),
823
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v4 is int?").WithArguments("int?"),
824
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v5 is long?").WithArguments("long?"),
825
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v6 is long?").WithArguments("long?"),
826
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v7 is float?").WithArguments("float?"),
827
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v8 is float?").WithArguments("float?"),
828
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "v9 is int?").WithArguments("int?")
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
FirstClassSpanTests.cs (3)
1074
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "arr() is Span<int>").WithArguments("System.Span<int>").WithLocation(2, 15));
1137
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "arr() is Span<string>").WithArguments("System.Span<string>").WithLocation(2, 15));
1200
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "str() is ReadOnlySpan<char>").WithArguments("System.ReadOnlySpan<char>").WithLocation(2, 15));
RefStructInterfacesTests.cs (6)
24039
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is S").WithArguments("S").WithLocation(22, 13)
24142
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is I1").WithArguments("I1").WithLocation(6, 13)
24374
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is U").WithArguments("U").WithLocation(6, 13)
24543
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is S").WithArguments("S").WithLocation(22, 13)
24656
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is S2").WithArguments("S2").WithLocation(6, 13)
24799
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "h2 is S").WithArguments("S").WithLocation(22, 13)
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),
6029
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is string").WithArguments("string").WithLocation(8, 13),
6035
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is long").WithArguments("long").WithLocation(14, 13),
6302
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, @"Console.Write(""Hello"") is object").WithArguments("object").WithLocation(6, 13)
6442
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 (23)
Semantics\NullableReferenceTypesTests.cs (4)
3645
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null! is object").WithArguments("object").WithLocation(9, 13),
3820
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is object").WithArguments("object").WithLocation(7, 13),
3823
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null! is object").WithArguments("object").WithLocation(8, 13),
54516
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is string").WithArguments("string").WithLocation(6, 13)
Semantics\OperatorTests.cs (14)
5538
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "Main() is T").WithArguments("T"));
5648
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "c2 is Outer<long>.C").WithArguments("Outer<long>.C").WithLocation(16, 13),
5657
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s2 is Outer<long>.S").WithArguments("Outer<long>.S").WithLocation(24, 13),
5666
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "e2 is Outer<long>.E").WithArguments("Outer<long>.E").WithLocation(32, 13));
5685
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "c is int").WithArguments("int").WithLocation(6, 16)
5773
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "0 is Enum").WithArguments("System.Enum").WithLocation(13, 13),
5776
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "i is Enum").WithArguments("System.Enum").WithLocation(14, 13),
5947
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "numeral is Goo").WithArguments("Goo"),
5950
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is Bar").WithArguments("Bar"),
5953
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "numeral is Goo2").WithArguments("Goo2"));
5983
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is C").WithArguments("C"));
6010
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "e is IntPtr").WithArguments("System.IntPtr"),
11948
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is ValueTuple<long, int>").WithArguments("(long, int)").WithLocation(7, 13),
11951
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is ValueTuple<short, int>").WithArguments("(short, int)").WithLocation(8, 13),
Semantics\SpanStackSafetyTests.cs (5)
245
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "o is Span<int>").WithArguments("System.Span<int>").WithLocation(7, 13),
269
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "t is Span<int>").WithArguments("System.Span<int>").WithLocation(7, 13),
291
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is object").WithArguments("object").WithLocation(7, 13),
313
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is T").WithArguments("T").WithLocation(7, 13),
335
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "s is T").WithArguments("T").WithLocation(7, 13),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Symbols\ConversionTests.cs (2)
1319
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "a is B").WithArguments("B"),
1321
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "b is A").WithArguments("A"));
Symbols\MissingSpecialMember.cs (1)
2203
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "x is bool").WithArguments("bool").WithLocation(16, 38),
Symbols\SymbolErrorTests.cs (3)
13410
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "null is C").WithArguments("C").WithLocation(14, 11),
13416
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, "1 is C").WithArguments("C").WithLocation(15, 11),
13422
Diagnostic(ErrorCode.
WRN_IsAlwaysFalse
, @"""a"" is C").WithArguments("C").WithLocation(16, 11)