Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@
<value>Property or indexer '{0}' cannot be assigned to -- it is read only</value>
</data>
<data name="ERR_IllegalStatement" xml:space="preserve">
<value>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</value>
<value>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</value>
</data>
<data name="ERR_BadGetEnumerator" xml:space="preserve">
<value>foreach requires that the return type '{0}' of '{1}' must have a suitable public MoveNext method and public Current property</value>
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Jako příkaz jde použít jenom objektové výrazy přiřazení, volání, zvýšení nebo snížení hodnoty nebo výrazy obsahující operátor new.</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Jako příkaz jde použít jenom objektové výrazy přiřazení, volání, zvýšení nebo snížení hodnoty nebo výrazy obsahující operátor new.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Nur assignment-, call-, increment-, decrement- und new object-Ausdrücke können als Anweisung verwendet werden.</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Nur assignment-, call-, increment-, decrement- und new object-Ausdrücke können als Anweisung verwendet werden.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Solo las expresiones de asignación, llamada, incremento, decremento y objeto nuevo se pueden usar como instrucción</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Solo las expresiones de asignación, llamada, incremento, decremento y objeto nuevo se pueden usar como instrucción</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Seuls une assignation, un appel, un incrément, un décrément et des expressions d'objet new peuvent être utilisés comme instruction</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Seuls une assignation, un appel, un incrément, un décrément et des expressions d'objet new peuvent être utilisés comme instruction</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Si possono usare come istruzioni solo le assegnazioni, le chiamate, gli incrementi, i decrementi e le nuove espressioni dell'oggetto</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Si possono usare come istruzioni solo le assegnazioni, le chiamate, gli incrementi, i decrementi e le nuove espressioni dell'oggetto</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">割り当て、呼び出し、インクリメント、デクリメント、新しいオブジェクトの式のみがステートメントとして使用できます。</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">割り当て、呼び出し、インクリメント、デクリメント、新しいオブジェクトの式のみがステートメントとして使用できます。</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">할당, 호출, 증가, 감소 및 새 개체 식만 문으로 사용할 수 있습니다.</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">할당, 호출, 증가, 감소 및 새 개체 식만 문으로 사용할 수 있습니다.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Jako instrukcji można używać tylko wyrażeń przypisania, wywołania, zwiększenia, zmniejszenia oraz utworzenia nowego obiektu.</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Jako instrukcji można używać tylko wyrażeń przypisania, wywołania, zwiększenia, zmniejszenia oraz utworzenia nowego obiektu.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Somente expressões de atribuição, chamada, incremento, diminuição e novo objeto podem ser usadas como uma instrução</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Somente expressões de atribuição, chamada, incremento, diminuição e novo objeto podem ser usadas como uma instrução</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">В качестве оператора могут использоваться только выражения присваивания, вызова, инкремента, декремента и создания нового объекта</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">В качестве оператора могут использоваться только выражения присваивания, вызова, инкремента, декремента и создания нового объекта</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">Yalnızca atama, çağrı, artırma, azaltma ve yeni nesne ifadeleri deyim olarak kullanılabilir</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">Yalnızca atama, çağrı, artırma, azaltma ve yeni nesne ifadeleri deyim olarak kullanılabilir</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">只有 assignment、call、increment、decrement 和 new 对象表达式可用作语句</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">只有 assignment、call、increment、decrement 和 new 对象表达式可用作语句</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,8 @@
<note />
</trans-unit>
<trans-unit id="ERR_IllegalStatement">
<source>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</source>
<target state="translated">只有指派、呼叫、遞增、遞減以及新的物件運算式,可以用做為陳述式。</target>
<source>Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement</source>
<target state="needs-review-translation">只有指派、呼叫、遞增、遞減以及新的物件運算式,可以用做為陳述式。</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetEnumerator">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7068,7 +7068,7 @@ static void Main()
// (6,18): error CS8185: A declaration is not allowed in this context.
// (int x1, string x2);
Diagnostic(ErrorCode.ERR_DeclarationExpressionNotPermitted, "string x2").WithLocation(6, 18),
// (6,9): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// (6,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// (int x1, string x2);
Diagnostic(ErrorCode.ERR_IllegalStatement, "(int x1, string x2)").WithLocation(6, 9),
// (6,10): error CS0165: Use of unassigned local variable 'x1'
Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTupleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14911,7 +14911,7 @@ void M(int x)

var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (6,9): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// (6,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// (x, x);
Diagnostic(ErrorCode.ERR_IllegalStatement, "(x, x)").WithLocation(6, 9)
);
Expand Down Expand Up @@ -15082,7 +15082,7 @@ void M()
" + trivial2uple + tupleattributes_cs;
var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (6,9): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// (6,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// (1, 1);
Diagnostic(ErrorCode.ERR_IllegalStatement, "(1, 1)").WithLocation(6, 9)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void Main()
null
";
var expectedDiagnostics = new DiagnosticDescription[] {
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// /*<bind>*/Action a = () => 1;/*</bind>*/
Diagnostic(ErrorCode.ERR_IllegalStatement, "1").WithLocation(7, 36)
};
Expand Down Expand Up @@ -207,7 +207,7 @@ void Main()
null
";
var expectedDiagnostics = new DiagnosticDescription[] {
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// Action a = /*<bind>*/(Action)(() => 1)/*</bind>*/;
Diagnostic(ErrorCode.ERR_IllegalStatement, "1").WithLocation(7, 45)
};
Expand Down Expand Up @@ -913,7 +913,7 @@ void Main()
null
";
var expectedDiagnostics = new DiagnosticDescription[] {
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// Action a = /*<bind>*/new Action(() => 1)/*</bind>*/;
Diagnostic(ErrorCode.ERR_IllegalStatement, "1").WithLocation(7, 47)
};
Expand Down Expand Up @@ -1373,7 +1373,7 @@ void Main()
null
";
var expectedDiagnostics = new DiagnosticDescription[] {
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// Action a = /*<bind>*/new Action((Action)(() => 1))/*</bind>*/;
Diagnostic(ErrorCode.ERR_IllegalStatement, "1").WithLocation(7, 56)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Type Arguments(2):
// CS0307: The property 'GetValue' cannot be used with type arguments
// /*<bind>*/d.GetValue<int, C1>/*</bind>*/;
Diagnostic(ErrorCode.ERR_TypeArgsNotAllowed, "GetValue<int, C1>").WithArguments("GetValue", "property").WithLocation(9, 25),
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// /*<bind>*/d.GetValue<int, C1>/*</bind>*/;
Diagnostic(ErrorCode.ERR_IllegalStatement, "d.GetValue<int, C1>").WithLocation(9, 23)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void Main(string[] args)
// CS0029: Cannot implicitly convert type 'Program' to 'bool'
// else if (x) x;
Diagnostic(ErrorCode.ERR_NoImplicitConv, "x").WithArguments("Program", "bool").WithLocation(12, 18),
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// else if (x) x;
Diagnostic(ErrorCode.ERR_IllegalStatement, "x").WithLocation(12, 21)
};
Expand Down Expand Up @@ -315,7 +315,7 @@ static void Main(string[] args)
// CS0103: The name 'P' does not exist in the current context
// /*<bind>*/for (P; x;)
Diagnostic(ErrorCode.ERR_NameNotInContext, "P").WithArguments("P").WithLocation(9, 24),
// CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// /*<bind>*/for (P; x;)
Diagnostic(ErrorCode.ERR_IllegalStatement, "P").WithLocation(9, 24),
// CS0029: Cannot implicitly convert type 'Program' to 'bool'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2457,10 +2457,10 @@ static int Main()
// (41,9): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
// Meth(1); //warning CS4014
Diagnostic(ErrorCode.WRN_UnobservedAwaitableExpression, "Meth(1)"),
// (47,9): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// (47,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// test.Prop; //error CS0201
Diagnostic(ErrorCode.ERR_IllegalStatement, "test.Prop"),
// (48,9): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
// (48,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
// test[1]; //error CS0201
Diagnostic(ErrorCode.ERR_IllegalStatement, "test[1]"),
// (44,23): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
Expand Down
Loading