未验证 提交 6550f516 编写于 作者: C Chris Sienkiewicz 提交者: GitHub

Minor using decl fixes (#39373)

* async -> asynchronous
* Fix up error messages for await using declarations in langver < 8.0
* Use CSharpTestBase.IAsyncDisposableDefinition for interfaces
上级 02d1b3cc
......@@ -7396,7 +7396,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method..
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an asynchronous using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method..
/// </summary>
internal static string ERR_NoConvToIAsyncDisp {
get {
......@@ -7405,7 +7405,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method. Did you mean &apos;using&apos; rather than &apos;await using&apos;?.
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an asynchronous using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method. Did you mean &apos;using&apos; rather than &apos;await using&apos;?.
/// </summary>
internal static string ERR_NoConvToIAsyncDispWrongAsync {
get {
......@@ -11158,6 +11158,15 @@ internal class CSharpResources {
}
}
/// <summary>
/// Looks up a localized string similar to asynchronous using.
/// </summary>
internal static string IDS_FeatureAsyncUsing {
get {
return ResourceManager.GetString("IDS_FeatureAsyncUsing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to automatically implemented properties.
/// </summary>
......
......@@ -2984,10 +2984,10 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<value>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</value>
</data>
<data name="ERR_NoConvToIAsyncDisp" xml:space="preserve">
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</value>
<value>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</value>
</data>
<data name="ERR_NoConvToIAsyncDispWrongAsync" xml:space="preserve">
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</value>
<value>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</value>
</data>
<data name="ERR_BadParamRef" xml:space="preserve">
<value>Parameter {0} must be declared with the '{1}' keyword</value>
......@@ -5951,4 +5951,7 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="ERR_InternalError" xml:space="preserve">
<value>Internal error in the C# compiler.</value>
</data>
</root>
<data name="IDS_FeatureAsyncUsing" xml:space="preserve">
<value>asynchronous using</value>
</data>
</root>
\ No newline at end of file
......@@ -181,6 +181,7 @@ internal enum MessageID
IDS_OverrideWithConstraints = MessageBase + 12761,
IDS_FeatureNestedStackalloc = MessageBase + 12762,
IDS_FeatureSwitchExpression = MessageBase + 12763,
IDS_FeatureAsyncUsing = MessageBase + 12764,
}
// Message IDs may refer to strings that need to be localized.
......@@ -308,6 +309,7 @@ internal static LanguageVersion RequiredVersion(this MessageID feature)
case MessageID.IDS_FeatureNestedStackalloc: // semantic check
case MessageID.IDS_FeatureNotNullGenericTypeConstraint:// semantic check
case MessageID.IDS_FeatureSwitchExpression:
case MessageID.IDS_FeatureAsyncUsing:
return LanguageVersion.CSharp8;
// C# 7.3 features.
......
......@@ -6470,17 +6470,17 @@ private StatementSyntax ParseStatementNoDeclaration(bool allowAnyExpression)
case SyntaxKind.IdentifierToken:
if (isPossibleAwaitForEach())
{
return this.ParseForEachStatement(parseAwaitKeywordForAsyncStreams());
return this.ParseForEachStatement(parseAwaitKeyword(MessageID.IDS_FeatureAsyncStreams));
}
else if (isPossibleAwaitUsing())
{
if (PeekToken(2).Kind == SyntaxKind.OpenParenToken)
{
return this.ParseUsingStatement(parseAwaitKeywordForAsyncStreams());
return this.ParseUsingStatement(parseAwaitKeyword(MessageID.IDS_FeatureAsyncUsing));
}
else
{
return this.ParseLocalDeclarationStatement(parseAwaitKeywordForAsyncStreams());
return this.ParseLocalDeclarationStatement(parseAwaitKeyword());
}
}
else if (this.IsPossibleLabeledStatement())
......@@ -6523,11 +6523,11 @@ bool isPossibleAwaitUsing()
this.PeekToken(1).Kind == SyntaxKind.UsingKeyword;
}
SyntaxToken parseAwaitKeywordForAsyncStreams()
SyntaxToken parseAwaitKeyword(MessageID? feature = null)
{
Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.AwaitKeyword);
SyntaxToken awaitToken = this.EatContextualToken(SyntaxKind.AwaitKeyword);
return CheckFeatureAvailability(awaitToken, MessageID.IDS_FeatureAsyncStreams);
return feature.HasValue ? CheckFeatureAvailability(awaitToken, feature.GetValueOrDefault()) : awaitToken;
}
}
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">{0}: typ použitý v příkazu async using musí být implicitně převoditelný na System.IAsyncDisposable nebo implementovat odpovídající metodu DisposeAsync. Neměli jste v úmyslu použít using místo await using?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">{0}: typ použitý v příkazu async using musí být implicitně převoditelný na System.IAsyncDisposable nebo implementovat odpovídající metodu DisposeAsync. Neměli jste v úmyslu použít using místo await using?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">alternativní interpolované doslovné řetězce</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">slučovací přiřazení</target>
......@@ -9726,8 +9731,8 @@ Pokud chcete odstranit toto varování, můžete místo toho použít /reference
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">{0}: typ použitý v příkazu async using musí být implicitně převoditelný na System.IAsyncDisposable nebo implementovat odpovídající metodu DisposeAsync.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">{0}: typ použitý v příkazu async using musí být implicitně převoditelný na System.IAsyncDisposable nebo implementovat odpovídající metodu DisposeAsync.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">"{0}": Der in einer asynchronen using-Anweisung verwendete Typ muss implizit in "System.IAsyncDisposable" konvertiert werden können oder eine geeignete DisposeAsync-Methode implementieren. Meinten Sie "using" anstelle von "await using"?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">"{0}": Der in einer asynchronen using-Anweisung verwendete Typ muss implizit in "System.IAsyncDisposable" konvertiert werden können oder eine geeignete DisposeAsync-Methode implementieren. Meinten Sie "using" anstelle von "await using"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">Alternative interpolierte ausführliche Zeichenfolgen</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">Zusammenfügungszuweisung</target>
......@@ -9726,8 +9731,8 @@ Um die Warnung zu beheben, können Sie stattdessen /reference verwenden (Einbett
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">"{0}": Der in einer asynchronen using-Anweisung verwendete Typ muss implizit in "System.IAsyncDisposable" konvertiert werden können oder eine geeignete DisposeAsync-Methode implementieren.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">"{0}": Der in einer asynchronen using-Anweisung verwendete Typ muss implizit in "System.IAsyncDisposable" konvertiert werden können oder eine geeignete DisposeAsync-Methode implementieren.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">"{0}": el tipo usado en una instrucción using asincrónica debe poder convertirse de forma implícita en "System.IAsyncDisposable" o implemente un método "DisposeAsync" adecuado. ¿Quiso decir "using" en lugar de "await using"?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">"{0}": el tipo usado en una instrucción using asincrónica debe poder convertirse de forma implícita en "System.IAsyncDisposable" o implemente un método "DisposeAsync" adecuado. ¿Quiso decir "using" en lugar de "await using"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -800,6 +800,11 @@
<target state="translated">cadenas textuales interpoladas alternativas</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">asignación de incorporación</target>
......@@ -9727,8 +9732,8 @@ Para eliminar la advertencia puede usar /reference (establezca la propiedad Embe
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">"{0}": el tipo usado en una instrucción using debe poder convertirse de forma implícita en "System.IAsyncDisposable" o implemente un método "DisposeAsync" adecuado.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">"{0}": el tipo usado en una instrucción using debe poder convertirse de forma implícita en "System.IAsyncDisposable" o implemente un método "DisposeAsync" adecuado.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}' : le type utilisé dans une instruction using asynchrone doit être implicitement convertible en 'System.IAsyncDisposable' ou implémenter une méthode 'DisposeAsync' appropriée. Vouliez-vous dire 'using' plutôt que 'await using' ?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}' : le type utilisé dans une instruction using asynchrone doit être implicitement convertible en 'System.IAsyncDisposable' ou implémenter une méthode 'DisposeAsync' appropriée. Vouliez-vous dire 'using' plutôt que 'await using' ?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">chaînes verbatim interpolées de remplacement</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">assignation de fusion</target>
......@@ -9726,8 +9731,8 @@ Pour supprimer l'avertissement, vous pouvez utiliser la commande /reference (dé
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}' : le type utilisé dans une instruction using asynchrone doit être implicitement convertible en 'System.IAsyncDisposable' ou implémenter une méthode 'DisposeAsync' appropriée.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}' : le type utilisé dans une instruction using asynchrone doit être implicitement convertible en 'System.IAsyncDisposable' ou implémenter une méthode 'DisposeAsync' appropriée.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': il tipo usato in un'istruzione using asincrona deve essere convertibile in modo implicito in 'System.IAsyncDisposable' o implementare un metodo 'DisposeAsync' adatto. Si intendeva 'using' invece di 'await using'?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': il tipo usato in un'istruzione using asincrona deve essere convertibile in modo implicito in 'System.IAsyncDisposable' o implementare un metodo 'DisposeAsync' adatto. Si intendeva 'using' invece di 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">stringhe verbatim interpolate alternative</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">assegnazione di coalescenza</target>
......@@ -9726,8 +9731,8 @@ Per rimuovere l'avviso, è invece possibile usare /reference (impostare la propr
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': il tipo usato in un'istruzione using asincrona deve essere convertibile in modo implicito in 'System.IAsyncDisposable' o implementare un metodo 'DisposeAsync' adatto.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': il tipo usato in un'istruzione using asincrona deve essere convertibile in modo implicito in 'System.IAsyncDisposable' o implementare un metodo 'DisposeAsync' adatto.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': 非同期 using ステートメントで使用される型は、暗黙的に 'System.IAsyncDisposable' に変換可能であるか、適切な 'DisposeAsync' メソッドを実装する必要があります。'await using' ではなく 'using' ですか?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': 非同期 using ステートメントで使用される型は、暗黙的に 'System.IAsyncDisposable' に変換可能であるか、適切な 'DisposeAsync' メソッドを実装する必要があります。'await using' ではなく 'using' ですか?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">代替的な挿入 verbatim 文字列</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">合体割り当て</target>
......@@ -9726,8 +9731,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': 非同期 using ステートメントで使用される型は、暗黙的に 'System.IAsyncDisposable' に変換可能であるか、適切な 'DisposeAsync' メソッドを実装する必要があります。</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': 非同期 using ステートメントで使用される型は、暗黙的に 'System.IAsyncDisposable' に変換可能であるか、適切な 'DisposeAsync' メソッドを実装する必要があります。</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': 비동기 using 문에 사용된 형식은 암시적으로 'System.IAsyncDisposable'로 변환할 수 있거나 적합한 'DisposeAsync' 메서드를 구현해야 합니다. 'await using' 대신 'using'을 사용하시겠습니까?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': 비동기 using 문에 사용된 형식은 암시적으로 'System.IAsyncDisposable'로 변환할 수 있거나 적합한 'DisposeAsync' 메서드를 구현해야 합니다. 'await using' 대신 'using'을 사용하시겠습니까?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">대체 보간된 축자 문자열</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">병합 할당</target>
......@@ -9726,8 +9731,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': 비동기 using 문에 사용된 형식은 암시적으로 System.IAsyncDisposable'로 변환할 수 있거나 적합한 DisposeAsync' 메서드를 구현해야 합니다.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': 비동기 using 문에 사용된 형식은 암시적으로 System.IAsyncDisposable'로 변환할 수 있거나 적합한 DisposeAsync' 메서드를 구현해야 합니다.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">„{0}”: Typ użyty w asynchronicznej instrukcji using musi być jawnie konwertowalny na typ „System.IAsyncDisposable” lub musi implementować odpowiednią metodę „DisposeAsync”. Czy chodziło Ci o użycie instrukcji „using”, a nie „await using”?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">„{0}”: Typ użyty w asynchronicznej instrukcji using musi być jawnie konwertowalny na typ „System.IAsyncDisposable” lub musi implementować odpowiednią metodę „DisposeAsync”. Czy chodziło Ci o użycie instrukcji „using”, a nie „await using”?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">alternatywne interpolowane ciągi dosłowne</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">przypisanie łączące</target>
......@@ -9726,8 +9731,8 @@ Aby usunąć ostrzeżenie, możesz zamiast tego użyć opcji /reference (ustaw w
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">„{0}”: Typ użyty w asynchronicznej instrukcji using musi być jawnie konwertowalny na typ „System.IAsyncDisposable” lub musi implementować odpowiednią metodę „DisposeAsync”.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">„{0}”: Typ użyty w asynchronicznej instrukcji using musi być jawnie konwertowalny na typ „System.IAsyncDisposable” lub musi implementować odpowiednią metodę „DisposeAsync”.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': o tipo usado em uma instrução async using deve ser implicitamente conversível em 'System.IAsyncDisposable' ou implementar um método 'DisposeAsync' adequado. Você quis dizer 'using' em vez de 'await using'?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': o tipo usado em uma instrução async using deve ser implicitamente conversível em 'System.IAsyncDisposable' ou implementar um método 'DisposeAsync' adequado. Você quis dizer 'using' em vez de 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">cadeias de caracteres textuais interpoladas alternativas</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">atribuição de união</target>
......@@ -9726,8 +9731,8 @@ Para incorporar informações de tipo de interoperabilidade para os dois assembl
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': o tipo usado em uma instrução async using deve ser implicitamente conversível em 'System.IAsyncDisposable' ou implementar um método 'DisposeAsync' adequado.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': o tipo usado em uma instrução async using deve ser implicitamente conversível em 'System.IAsyncDisposable' ou implementar um método 'DisposeAsync' adequado.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">"{0}": тип, используемый в асинхронном операторе using, должен допускать неявное преобразование в тип "System.IAsyncDisposable" или реализовывать подходящий метод "DisposeAsync". Возможно, вы имели в виду "using", а не "await using"?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">"{0}": тип, используемый в асинхронном операторе using, должен допускать неявное преобразование в тип "System.IAsyncDisposable" или реализовывать подходящий метод "DisposeAsync". Возможно, вы имели в виду "using", а не "await using"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">альтернативные интерполированные строки verbatim</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">назначение объединения</target>
......@@ -9726,8 +9731,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">"{0}": тип, используемый в асинхронном операторе using, должен допускать неявное преобразование в тип "System.IAsyncDisposable" или реализовывать подходящий метод "DisposeAsync".</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">"{0}": тип, используемый в асинхронном операторе using, должен допускать неявное преобразование в тип "System.IAsyncDisposable" или реализовывать подходящий метод "DisposeAsync".</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': Zaman uyumsuz bir using deyiminde kullanılan tür örtük olarak 'System.IAsyncDisposable' arabirimine dönüştürebilir olmalı veya uygun bir 'DisposeAsync' yöntemi uygulamalıdır. 'await using' yerine 'using' mi kullanmak istediniz?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': Zaman uyumsuz bir using deyiminde kullanılan tür örtük olarak 'System.IAsyncDisposable' arabirimine dönüştürebilir olmalı veya uygun bir 'DisposeAsync' yöntemi uygulamalıdır. 'await using' yerine 'using' mi kullanmak istediniz?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">alternatif ilişkilendirilmiş tam dizeler</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">birleştirme ataması</target>
......@@ -9726,8 +9731,8 @@ Uyarıyı kaldırmak için, /reference kullanabilirsiniz (Birlikte Çalışma T
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': Bir async using deyiminde kullanılan tür örtük olarak 'System.IAsyncDisposable' arabirimine dönüştürebilir olmalı veya uygun bir 'DisposeAsync' yöntemi uygulamalıdır.</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': Bir async using deyiminde kullanılan tür örtük olarak 'System.IAsyncDisposable' arabirimine dönüştürebilir olmalı veya uygun bir 'DisposeAsync' yöntemi uygulamalıdır.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">“{0}”: 异步 using 语句中使用的类型必须可隐式转换为 "System.IAsyncDisposable" 或实现适用的 "DisposeAsync" 方法。是否希望使用 "using" 而非 "await using"?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">“{0}”: 异步 using 语句中使用的类型必须可隐式转换为 "System.IAsyncDisposable" 或实现适用的 "DisposeAsync" 方法。是否希望使用 "using" 而非 "await using"?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">可选择的内插逐字字符串</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">合并赋值</target>
......@@ -9726,8 +9731,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">“{0}”: 异步 using 语句中使用的类型必须可隐式转换为 "System.IAsyncDisposable" 或实现适用的 "DisposeAsync" 方法。</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">“{0}”: 异步 using 语句中使用的类型必须可隐式转换为 "System.IAsyncDisposable" 或实现适用的 "DisposeAsync" 方法。</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -293,8 +293,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="translated">'{0}': 在非同步 using 陳述式中使用的類型,必須可隱含地轉換為 'System.IAsyncDisposable' 或實作合適的 'DisposeAsync' 方法。您指的是 'using' 而不是 'await using' 嗎?</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="needs-review-translation">'{0}': 在非同步 using 陳述式中使用的類型,必須可隱含地轉換為 'System.IAsyncDisposable' 或實作合適的 'DisposeAsync' 方法。您指的是 'using' 而不是 'await using' 嗎?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
......@@ -799,6 +799,11 @@
<target state="translated">插入的逐字替代字串</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureAsyncUsing">
<source>asynchronous using</source>
<target state="new">asynchronous using</target>
<note />
</trans-unit>
<trans-unit id="IDS_FeatureCoalesceAssignmentExpression">
<source>coalescing assignment</source>
<target state="translated">聯合指派</target>
......@@ -9726,8 +9731,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="translated">'{0}': 在非同步 using 陳述式中使用的類型,必須可隱含地轉換為 'System.IAsyncDisposable' 或實作合適的 'DisposeAsync' 方法。</target>
<source>'{0}': type used in an asynchronous using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="needs-review-translation">'{0}': 在非同步 using 陳述式中使用的類型,必須可隱含地轉換為 'System.IAsyncDisposable' 或實作合適的 'DisposeAsync' 方法。</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -861,15 +861,8 @@ public interface IAsyncEnumerator<out T> : System.IAsyncDisposable
T Current { get; }
}
}
namespace System
{
public interface IAsyncDisposable
{
System.Threading.Tasks.ValueTask DisposeAsync();
}
}
";
var comp = CreateCompilationWithTasksExtensions(new[] { source });
var comp = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition });
comp.VerifyDiagnostics(
// (8,42): error CS0234: The type or namespace name 'IAsyncEnumerable<>' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?)
// async System.Collections.Generic.IAsyncEnumerable<int> local()
......
......@@ -8,15 +8,6 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.CodeGen
{
public class CodeGenUsingDeclarationTests : EmitMetadataTestBase
{
private const string _asyncDisposable = @"
namespace System
{
public interface IAsyncDisposable
{
System.Threading.Tasks.ValueTask DisposeAsync();
}
}";
[ConditionalFact(typeof(WindowsOnly), Reason = ConditionalSkipReason.NativePdbRequiresDesktop)]
public void UsingVariableVarEmitTest()
{
......@@ -683,7 +674,7 @@ Created Catch
Created Finally
Dispose Async Finally
";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: expectedOutput);
}
......@@ -1164,7 +1155,7 @@ static async Task Main()
await using C1 c = new C1();
}
}";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: "Dispose async");
}
......@@ -1191,7 +1182,7 @@ static async Task Main()
await using C1 c = new C1();
}
}";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: "Dispose async");
}
......@@ -1236,7 +1227,7 @@ After declarations
Dispose async second
Dispose async first
";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: expectedOutput);
}
......@@ -1283,7 +1274,7 @@ After declarations
Dispose async first
";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: expectedOutput);
}
......@@ -1319,7 +1310,7 @@ static async Task Main()
Console.Write(""After declarations; "");
}
}";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable, options: TestOptions.DebugExe).VerifyDiagnostics();
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, options: TestOptions.DebugExe).VerifyDiagnostics();
CompileAndVerify(compilation, expectedOutput: "After declarations; ");
}
......@@ -1346,7 +1337,7 @@ static async Task Main()
}
}";
var comp = CreateCompilationWithTasksExtensions(source + _asyncDisposable);
var comp = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition });
comp.MakeTypeMissing(WellKnownType.System_Threading_Tasks_ValueTask);
comp.VerifyDiagnostics(
// (16,9): error CS0518: Predefined type 'System.Threading.Tasks.ValueTask' is not defined or imported
......
......@@ -686,27 +686,17 @@ static async Task Main()
await using IAsyncDisposable x = null;
}
}
namespace System
{
public interface IAsyncDisposable
{
System.Threading.Tasks.ValueTask DisposeAsync();
}
}";
// https://github.com/dotnet/roslyn/issues/32318 Diagnostics should be tuned. There should only be a parsing error for `using declarations` feature.
";
var expected = new[]
{
// (8,9): error CS8652: The feature 'async streams' is not available in C# 7.3. Please use language version 8.0 or greater.
// await using IAsyncDisposable x = null;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "await").WithArguments("async streams", "8.0").WithLocation(8, 9),
// (8,15): error CS8652: The feature 'using declarations' is not available in C# 7.3. Please use language version 8.0 or greater.
// await using IAsyncDisposable x = null;
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "using").WithArguments("using declarations", "8.0").WithLocation(8, 15)
};
CreateCompilationWithTasksExtensions(source, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(expected);
CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(expected);
CreateCompilationWithTasksExtensions(source, parseOptions: TestOptions.RegularPreview).VerifyDiagnostics();
CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }, parseOptions: TestOptions.RegularPreview).VerifyDiagnostics();
}
[Fact]
......
......@@ -29,15 +29,6 @@ public void Dispose()
{ }
}";
private const string _asyncDisposable = @"
namespace System
{
public interface IAsyncDisposable
{
System.Threading.Tasks.ValueTask DisposeAsync();
}
}";
[Fact]
public void SemanticModel()
{
......@@ -1132,7 +1123,7 @@ await using (S1 c = new S1())
}
}
}";
var compilation = CreateCompilationWithTasksExtensions(source + _asyncDisposable).VerifyDiagnostics(
var compilation = CreateCompilationWithTasksExtensions(new[] { source, IAsyncDisposableDefinition }).VerifyDiagnostics(
// (16,22): error CS4012: Parameters or locals of type 'S1' cannot be declared in async methods or lambda expressions.
// await using (S1 c = new S1())
Diagnostic(ErrorCode.ERR_BadSpecialByRefLocal, "S1").WithArguments("S1").WithLocation(16, 22)
......
......@@ -23,7 +23,7 @@ protected override CSharpSyntaxNode ParseNode(string text, CSharpParseOptions op
return SyntaxFactory.ParseExpression(text, options: (options ?? TestOptions.Regular).WithLanguageVersion(LanguageVersion.CSharp8));
}
[Fact]
[Fact, WorkItem(32318, "https://github.com/dotnet/roslyn/issues/32318")]
public void AwaitUsingDeclaration_WithCSharp73()
{
string source = @"
......@@ -39,9 +39,9 @@ await using (var x = this)
";
var tree = SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_3));
tree.GetDiagnostics().Verify(
// (6,9): error CS8652: The feature 'async streams' is not available in C# 7.3. Please use language version 8.0 or greater.
// (6,9): error CS8652: The feature 'asynchronous using' is not available in C# 7.3. Please use language version 8.0 or greater.
// await using (var x = this)
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "await").WithArguments("async streams", "8.0").WithLocation(6, 9)
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion7_3, "await").WithArguments("asynchronous using", "8.0").WithLocation(6, 9)
);
UsingTree(source);
......
......@@ -182,12 +182,11 @@ public sealed class NotNullIfNotNullAttribute : Attribute
";
protected const string IAsyncDisposableDefinition = @"
using System.Threading.Tasks;
namespace System
{
public interface IAsyncDisposable
{
ValueTask DisposeAsync();
System.Threading.Tasks.ValueTask DisposeAsync();
}
}
";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册