diff options
Diffstat (limited to 'src/pkg/go/printer/testdata/declarations.golden')
-rw-r--r-- | src/pkg/go/printer/testdata/declarations.golden | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/pkg/go/printer/testdata/declarations.golden b/src/pkg/go/printer/testdata/declarations.golden index 0331615e5..a27f21fc8 100644 --- a/src/pkg/go/printer/testdata/declarations.golden +++ b/src/pkg/go/printer/testdata/declarations.golden @@ -397,6 +397,21 @@ func _() { } } +// use the formatted output rather than the input to decide when to align +// (was issue 4505) +const ( + short = 2 * (1 + 2) + aMuchLongerName = 3 +) + +var ( + short = X{} + aMuchLongerName = X{} + + x1 = X{} // foo + x2 = X{} // foo +) + func _() { type ( xxxxxx int @@ -723,7 +738,8 @@ func _() int { } // making function declarations safe for new semicolon rules -func _() { /* multi-line func because of comment */ +func _() { /* single-line function because of "short-ish" comment */ } +func _() { /* multi-line function because of "long-ish" comment - much more comment text is following here */ /* and more */ } func _() { |