File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ PrintOptions PrintOptions::printParseableInterfaceFile() {
104
104
result.OmitNameOfInaccessibleProperties = true ;
105
105
result.FunctionDefinitions = true ;
106
106
result.CollapseSingleGetterProperty = false ;
107
+ result.VarInitializers = true ;
107
108
108
109
result.FunctionBody = [](const ValueDecl *decl, ASTPrinter &printer) {
109
110
auto AFD = dyn_cast<AbstractFunctionDecl>(decl);
@@ -2099,14 +2100,12 @@ void PrintAST::visitPatternBindingDecl(PatternBindingDecl *decl) {
2099
2100
}
2100
2101
2101
2102
if (Options.VarInitializers ) {
2102
- // FIXME: Implement once we can pretty-print expressions.
2103
- }
2104
-
2105
- auto vd = entry.getAnchoringVarDecl ();
2106
- if (entry.hasInitStringRepresentation () &&
2107
- vd->isInitExposedToClients ()) {
2108
- SmallString<128 > scratch;
2109
- Printer << " = " << entry.getInitStringRepresentation (scratch);
2103
+ auto vd = entry.getAnchoringVarDecl ();
2104
+ if (entry.hasInitStringRepresentation () &&
2105
+ vd->isInitExposedToClients ()) {
2106
+ SmallString<128 > scratch;
2107
+ Printer << " = " << entry.getInitStringRepresentation (scratch);
2108
+ }
2110
2109
}
2111
2110
2112
2111
// HACK: If we're just printing a single pattern and it has accessors,
You can’t perform that action at this time.
0 commit comments