mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Previously, a multi-pattern var/let decl like: var x = 4, y = 17 would produce two pattern binding decls (one for x=4 one for y=17). This is convenient in some ways, but is bad for source reproducibility from the ASTs (see, e.g. the improvements in test/IDE/structure.swift and test/decl/inherit/initializer.swift). The hardest part of this change was to get parseDeclVar to set up the AST in a way compatible with our existing assumptions. I ended up with an approach that forms PBDs in more erroneous cases than before. One downside of this is that we now produce a spurious "type annotation missing in pattern" diagnostic in some cases. I'll take care of that in a follow-on patch. Swift SVN r26224
29 KiB
29 KiB