File tree Expand file tree Collapse file tree 3 files changed +29
-4
lines changed
Expand file tree Collapse file tree 3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 1+ # Swift Syntax 603 Release Notes
2+
3+ ## New APIs
4+
5+ - ` GenericParameterSyntax ` now has a new ` initializer ` property.
6+ - Description: Generic parameters can now optionally be passed a default type. The ` initializer ` is a ` TypeInitializerSyntax ` that captures both the ` = ` and the parsed ` TypeSyntax ` .
7+ - Pull Request: https://github.com/swiftlang/swift-syntax/pull/3152
8+
9+ ## API Behavior Changes
10+
11+ ## Deprecations
12+
13+ ## API-Incompatible Changes
14+
15+ ## Template
16+
17+ - * Affected API or two word description*
18+ - Description: * A 1-2 sentence description of the new/modified API*
19+ - Issue: * If an issue exists for this change, a link to the issue*
20+ - Pull Request: * Link to the pull request(s) that introduces this change*
21+ - Migration steps: Steps that adopters of swift-syntax should take to move to the new API (required for deprecations and API-incompatible changes).
22+ - Notes: * In case of deprecations or API-incompatible changes, the reason why this change was made and the suggested alternative*
23+
24+ * Insert entries in chronological order, with newer entries at the bottom*
Original file line number Diff line number Diff line change @@ -680,8 +680,9 @@ extension Parser {
680680 // type parameters, not parameter packs or value generics yet.
681681 let defaultType : RawTypeInitializerClauseSyntax ?
682682 if self . experimentalFeatures. contains ( . defaultGenerics) ,
683- specifier == nil ,
684- let equal = self . consume ( if: . equal) {
683+ specifier == nil ,
684+ let equal = self . consume ( if: . equal)
685+ {
685686 let type = self . parseType ( )
686687 defaultType = RawTypeInitializerClauseSyntax (
687688 equal: equal,
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ final class DefaultGenericsTest: ParserTestCase {
7676 ) ,
7777 DiagnosticSpec (
7878 message: " unexpected code '= Int>' in struct "
79- )
79+ ) ,
8080 ] ,
8181 fixedSource: """
8282 struct A<each T> = Int> {}
@@ -98,7 +98,7 @@ final class DefaultGenericsTest: ParserTestCase {
9898 ) ,
9999 DiagnosticSpec (
100100 message: " unexpected code '= Int>' in struct "
101- )
101+ ) ,
102102 ] ,
103103 fixedSource: """
104104 struct A<let n: Int> = Int> {}
You can’t perform that action at this time.
0 commit comments