From 7ea0b8e328bc9eca7a71cd2d07dcaf47b364ecec Mon Sep 17 00:00:00 2001 From: Julien Couvreur Date: Wed, 25 Mar 2020 07:13:54 -0700 Subject: [PATCH] Update target-typed-new.md --- proposals/target-typed-new.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proposals/target-typed-new.md b/proposals/target-typed-new.md index ea38555..1966d3f 100644 --- a/proposals/target-typed-new.md +++ b/proposals/target-typed-new.md @@ -76,6 +76,8 @@ Action a = new(); // no constructor found ### Miscellaneous +`throw new()` is allowed. + Target-typed `new` is not allowed with binary operators. It is disallowed when there is no type to target: unary operators, collection of a `foreach`, in a `using`, in a deconstruction, in an `await` expression, as an anonymous type property (`new { Prop = new() }`), in a `lock` statement, in a `sizeof`, in a `fixed` statement, in a member access (`new().field`), in a dynamically dispatched operation (`someDynamic.Method(new())`), in a LINQ query, as the operand of the `is` operator, as the left operand of the `??` operator, ...