- 05 12月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
-
- 04 12月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
We now forbid the use of `var` as a pattern's type except in the var pattern, where it is forbidden to bind to a user-declared type. Requires LDM and compat council review.
-
- 01 12月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
Add a when clause to the switch expression's cases Add support for binding the switch expression (but not decision tree) Implement flow analysis for switch expression Adjust precedence of the constant pattern in a switch expression arm.
-
- 22 11月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
-
- 18 11月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
- [x] https://github.com/dotnet/roslyn/pull/23208#discussion_r151519706 try-finally can be eliminated in local function `looksLikeCast` in `ParseExpressionOrPattern` - [x] Recommend adding some blank lines back to Syntax.xml. See https://github.com/dotnet/roslyn/pull/23208#discussion_r151802628 and https://github.com/dotnet/roslyn/pull/23208#discussion_r151802657 . - [x] Parameter unused in `private ScanTypeFlags ScanType(bool forPattern = false)`; See https://github.com/dotnet/roslyn/pull/23208#discussion_r151807815 . Also the same comment for the caller; see https://github.com/dotnet/roslyn/pull/23208#discussion_r151808973 . - [x] Prefer types spelled out instead of `out var` (including in `LanguageParser.cs` and `LanguageParser_Patterns.cs`); See https://github.com/dotnet/roslyn/pull/23208#discussion_r151808453 and https://github.com/dotnet/roslyn/pull/23208#discussion_r151808516 et al.
-
- 15 11月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
- Add support for recursive patterns in `is`. - Add the discard pattern `_`. - Add skeletal IOperation support. - Adjust tests per changes in `is pattern` code gen.
-
- 12 11月, 2017 1 次提交
-
-
由 Neal Gafter 提交于
-
- 30 9月, 2017 1 次提交
-
-
由 vsadov 提交于
- "in" argument matches only "in" parameters (as opposed to unmodified case that can also match byval parameters) - "in" requires that the argument is an lvalue - "in" does not allow conversions at the call-site other than identity conversions - "in" sets an exact bound in generic method type inference - "in" cannot be stack-spilled by value
-
- 05 4月, 2017 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 11 3月, 2017 1 次提交
-
-
由 Julien 提交于
Conflicts: src/Compilers/CSharp/Portable/Binder/Semantics/Conversions/ConversionKind.cs src/Compilers/CSharp/Portable/Binder/Semantics/Conversions/ConversionKindExtensions.cs src/Compilers/CSharp/Portable/Errors/MessageID.cs src/Compilers/CSharp/Portable/Parser/LanguageParser.cs src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt src/Compilers/CSharp/Portable/Syntax/Syntax.xml src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs src/Compilers/CSharp/Test/Semantic/CSharpCompilerSemanticTest.csproj src/Compilers/CSharp/Test/Syntax/Parsing/ExpressionParsingTests.cs src/Test/Utilities/Desktop/TestResource.resx src/Test/Utilities/Shared/Traits/CompilerFeature.cs
-
- 23 2月, 2017 1 次提交
-
-
由 Omar Tawfik 提交于
-
- 16 2月, 2017 1 次提交
-
-
由 vsadov 提交于
* Syntax model and Parsing * Support for 7.1 language version - just enough to unblock testing.
-
- 12 12月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
* Combine deconstruction assignment and declaration, and support discards. - Combine deconstruction assignment and declaration, and support discards. - Add wildcards.work.md to track outstanding work. - Bind each type syntax once in a deconstruction. - Because tuples may contain declarations, adjust lambda disambiguation and adjust parsing of argument lists. - Diagnose tuple element names on the left of a deconstruction. - Add relational operators to disambiguating tokens in 7.5.4.2 * Disallow deconstruction declarations except at the statement level. This is now a semantic restriction (until we decide to remove it). * Revise logic to detect `var` in a declaration expression. Plus other changes per code review. * Add a test that GetTypeInfo on a discard expression doesn't crash. * Small changes per code review. * Add (skipped) test for var invocation in parens. * Rename "Discarded" to "Discard" * Changes recommended via code review. * Minor changes to the handling of declaration expressions per code review. * Addressing blocking feedback while Neal is OOF Fixes https://github.com/dotnet/roslyn/issues/14794 Fixes https://github.com/dotnet/roslyn/issues/14832
-
- 29 11月, 2016 1 次提交
-
-
由 AlekseyTs 提交于
Fixes #14881. Fixes #15476.
-
- 22 11月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
Also add wildcards.work.md to track outstanding work.
-
- 09 11月, 2016 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 01 11月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
Also clean up some grammar in Syntax.xml Fixes #14651
-
- 02 9月, 2016 1 次提交
-
-
由 Eik Rentzow 提交于
-
- 30 8月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
Fixes #13389
-
- 06 8月, 2016 2 次提交
-
-
由 gafter 提交于
wouldn't that be annoying to notice after we've shipped?
-
由 Neal Gafter 提交于
Similarly for TupleDeconstructionVariableDesignation. Also found many places to handle both kinds of foreach statements.
-
- 05 8月, 2016 1 次提交
-
-
由 gafter 提交于
-
- 04 8月, 2016 1 次提交
-
-
由 gafter 提交于
Also update the out var syntax node to use the newly introduced VariableComponent so it can be extended in the future to allow `out *` or `out var (x, y)` etc without requiring any further changes to the syntax model. Fixes #12747, #12664, #12588, #1503
-
- 31 7月, 2016 1 次提交
-
-
由 gafter 提交于
(e.g. ref local variable declaration) We introduce a "ref expression" for use in expressions (e.g. right-hand-side of a ref variable initialization) Also improve the diagnostic for local functions. Fixes #12749, #12580
-
- 29 7月, 2016 1 次提交
-
-
由 gafter 提交于
Fixes #12703
-
- 22 7月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
-
- 30 6月, 2016 1 次提交
-
-
由 Charles Stoner 提交于
-
- 25 6月, 2016 1 次提交
-
-
由 Julien 提交于
-
- 04 6月, 2016 1 次提交
-
-
由 AlekseyTs 提交于
Adjusted behavior of CSharpSyntaxGenerator and added some explicitly written code to achieve the following for the Syntax Model: - Factory static ArgumentSyntax Argument(NameColonSyntax nameColon, SyntaxToken refOrOutKeyword, CSharpSyntaxNode expressionOrDeclaration) will be internal. - Factory static ArgumentSyntax Argument(CSharpSyntaxNode expressionOrDeclaration) will be internal. - There will be the following public factories: public static ArgumentSyntax Argument(NameColonSyntax nameColon, SyntaxToken refOrOutKeyword, ExpressionSyntax expression) public static ArgumentSyntax Argument(ExpressionSyntax expression) public static ArgumentSyntax Argument(NameColonSyntax nameColon, SyntaxToken outKeyword, VariableDeclarationSyntax declaration) public static ArgumentSyntax Argument(SyntaxToken outKeyword, VariableDeclarationSyntax declaration) - Update method ArgumentSyntax Update(NameColonSyntax nameColon, SyntaxToken refOrOutKeyword, CSharpSyntaxNode expressionOrDeclaration) will be internal. - There will be the following public update methods: public ArgumentSyntax Update(NameColonSyntax nameColon, SyntaxToken refOrOutKeyword, ExpressionSyntax expression) public ArgumentSyntax Update(NameColonSyntax nameColon, SyntaxToken outKeyword, VariableDeclarationSyntax declaration) - With method ArgumentSyntax WithExpressionOrDeclaration(CSharpSyntaxNode expressionOrDeclaration) will be internal. - There will be the following public With methods: public ArgumentSyntax WithNameColon(NameColonSyntax nameColon) public ArgumentSyntax WithRefOrOutKeyword(SyntaxToken refOrOutKeyword) public ArgumentSyntax WithExpression(ExpressionSyntax expression) public ArgumentSyntax WithDeclaration(VariableDeclarationSyntax declaration) - Property CSharpSyntaxNode ExpressionOrDeclaration will be internal. - Instead there will be the following public properties (one of them will return null depending on the value of ExpressionOrDeclaration): public ExpressionSyntax Expression public VariableDeclarationSyntax Declaration - Factory, Update and With methods should provide stronger validation: a) ExpressionOrDeclaration must either be an ExpressionSyntax, or a VariableDeclarationSyntax; b) Declaration must be combined with out keyword; c) Declaration must have single VariableDeclarator; d) VariableDeclarator must have null ArgumentList and null Initializer.
-
- 28 5月, 2016 1 次提交
-
-
由 AlekseyTs 提交于
-
- 18 5月, 2016 1 次提交
-
-
由 AlekseyTs 提交于
- Feature flag. - Syntax model changes. - Parsing. - Binding (for explicitly typed variables only). - Flow analysis. - SemanticModel – added new API GetDeclaredSymbol(ArgumentSyntax) to return symbol for the declared local. Basic scenarios work end to end.
-
- 28 4月, 2016 1 次提交
-
-
由 VSadov 提交于
Most interesting parts here are: * the syntax node shape and naming - these are public APIs so we should get the naming right. NOTE: I expect some churn here so for now I have disabled the public API diagnostics. * parsing something that starts with "(" is tricky since that can be a start of many constructs - lambdas, casts, parenthesized expressions... I have updated the lookahead logic that tries to figure what we are dealing with, but it may need some tuning to be more robust. In particular there could be some error recovery work to see that handling of broken code is sensible. ==== Current assumptions: 1) TupleTypes and TupleExpressions must have 2 or more elements/arguments. However we may have to parse 0 and 1 sized expressions for error recovery reasons. Those are syntax errors. 2) TupleType looks like (int x, int y) x = ... I.E. ( type [name], type [name]) We may enforce that all or no elements have names. Not sure yet if that needs to be in parser or binder. 3) TupleExpression looks like var something = (x: foo(), y: bar); I.E. ( [name:] expr, [name:] expr) just like with the types we may want to enforce that all or none of the arguments have names. Not sure if that is a syntax or binding error. It is not a part of this change.
-
- 27 4月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
-
- 12 4月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
consistency with terminology used in the LDM.
-
- 29 3月, 2016 1 次提交
-
-
由 Charles Stoner 提交于
-
- 24 3月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
Note that the test passes due to smoke and mirrors, not because `operator is` works.
-
- 06 3月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
-
- 05 3月, 2016 2 次提交
-
-
由 Neal Gafter 提交于
-
由 Neal Gafter 提交于
Fixes #9371 Related to #9284
-
- 27 2月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
-