diff options
Diffstat (limited to 'libgo/go/go/printer/testdata/comments.input')
-rw-r--r-- | libgo/go/go/printer/testdata/comments.input | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libgo/go/go/printer/testdata/comments.input b/libgo/go/go/printer/testdata/comments.input index 30cd23c..40351ee 100644 --- a/libgo/go/go/printer/testdata/comments.input +++ b/libgo/go/go/printer/testdata/comments.input @@ -607,6 +607,24 @@ func _() { _ = a } +// Test cases from issues 11274, 15137: +// Semicolon must not be lost when multiple statements are on the same line with a comment. +func _() { + x := 0 /**/; y := 1 +} + +func _() { + f(); f() + f(); /* comment */ f() + f() /* comment */; f() + f(); /* a */ /* b */ f() + f() /* a */ /* b */; f() + f() /* a */; /* b */ f() +} + +func _() { + f() /* a */ /* b */ } + // Comments immediately adjacent to punctuation followed by a newline // remain after the punctuation (looks better and permits alignment of // comments). |