From a127cd7162aacd2a92e87a962e3a4f06ffa165cc Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Mon, 11 Mar 2019 13:51:52 -0700 Subject: [PATCH] PR Feedback --- src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs | 2 +- .../Test/Semantic/Semantics/NullableReferenceTypesTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs index 7b240dd0f7b..bc174a20350 100644 --- a/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs +++ b/src/Compilers/CSharp/Portable/FlowAnalysis/NullableWalker.cs @@ -295,7 +295,7 @@ protected override ImmutableArray Scan(ref bool badRegion) { if (compilation.LanguageVersion < MessageID.IDS_FeatureNullableReferenceTypes.RequiredVersion() || attribute.Constructor is null || - !compilation.SyntaxTrees.Contains(attribute.SyntaxTree)) + !compilation.SyntaxTrees.Contains(attribute.SyntaxTree)) // don't analyze speculative attributes { return; } diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs index 88dd6ec02ff..e4e04179e47 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/NullableReferenceTypesTests.cs @@ -4755,7 +4755,7 @@ class E { } // public MyAttribute(string s, string s2 = null) { } //1 Diagnostic(ErrorCode.WRN_NullAsNonNullable, "null").WithLocation(4, 46), // (10,21): warning CS8625: Cannot convert null literal to non-nullable reference or unconstrained type parameter. - // [MyAttribute("str", null)] // 3 + // [MyAttribute("str", null)] // 2 Diagnostic(ErrorCode.WRN_NullAsNonNullable, "null").WithLocation(10, 21) ); } -- GitLab