提交 c65959b6 编写于 作者: A Andy Gocke

Fix some test baselines and ErrorCode typo

上级 7ea6fa4d
......@@ -1620,7 +1620,7 @@ internal enum ErrorCode
WRN_MissingNonNullTypesContextForAnnotation = 8632,
WRN_NullabilityMismatchInConstraintsOnImplicitImplementation = 8633,
WRN_NullabilityMismatchInTypeParameterReferenceTypeConstraint = 8634,
ERR_TripleDotNotAllowed = 8400,
ERR_TripleDotNotAllowed = 8635,
#endregion diagnostics introduced for C# 8.0
}
......
......@@ -201,9 +201,9 @@ void M()
var x = ^1;
}
}", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3)).VerifyDiagnostics(
// (6,17): error CS8370: Feature 'index operator' is not available in C# 7.3. Please use language version 8 or greater.
// (6,17): error CS8370: Feature 'index operator' is not available in C# 7.3. Please use language version 8.0 or greater.
// var x = ^1;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "^1").WithArguments("index operator", "8").WithLocation(6, 17));
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "^1").WithArguments("index operator", "8.0").WithLocation(6, 17));
}
[Fact]
......@@ -660,18 +660,18 @@ void M()
var d = ..;
}
}", parseOptions: new CSharpParseOptions(LanguageVersion.CSharp7_3)).VerifyDiagnostics(
// (6,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8 or greater.
// (6,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8.0 or greater.
// var a = 1..2;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "1..2").WithArguments("range operator", "8").WithLocation(6, 17),
// (7,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8 or greater.
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "1..2").WithArguments("range operator", "8.0").WithLocation(6, 17),
// (7,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8.0 or greater.
// var b = 1..;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "1..").WithArguments("range operator", "8").WithLocation(7, 17),
// (8,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8 or greater.
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "1..").WithArguments("range operator", "8.0").WithLocation(7, 17),
// (8,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8.0 or greater.
// var c = ..2;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "..2").WithArguments("range operator", "8").WithLocation(8, 17),
// (9,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8 or greater.
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "..2").WithArguments("range operator", "8.0").WithLocation(8, 17),
// (9,17): error CS8370: Feature 'range operator' is not available in C# 7.3. Please use language version 8.0 or greater.
// var d = ..;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "..").WithArguments("range operator", "8").WithLocation(9, 17));
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "..").WithArguments("range operator", "8.0").WithLocation(9, 17));
}
[Fact]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册