~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/go/printer/testdata/declarations.input

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
667
667
        abcde: a, // align with previous line
668
668
}
669
669
 
 
670
// alignment of map composite entries: test cases from issue 3965
 
671
// aligned
 
672
var _ = T1{
 
673
        a:                    x,
 
674
        b:                    y,
 
675
        cccccccccccccccccccc: z,
 
676
}
 
677
 
 
678
// not aligned
 
679
var _ = T2{
 
680
        a: x,
 
681
        b: y,
 
682
        ccccccccccccccccccccc: z,
 
683
}
 
684
 
 
685
// aligned
 
686
var _ = T3{
 
687
        aaaaaaaaaaaaaaaaaaaa: x,
 
688
        b:                    y,
 
689
        c:                    z,
 
690
}
 
691
 
 
692
// not aligned
 
693
var _ = T4{
 
694
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: x,
 
695
        b:                                       y,
 
696
        c:                                       z,
 
697
}
 
698
 
670
699
 
671
700
func _() {
672
701
        var _ = T{
867
896
r string,
868
897
                x ...int)
869
898
}
 
899
 
 
900
// omit superfluous parentheses in parameter lists
 
901
func _((int))
 
902
func _((((((int))))))
 
903
func _(x (int))
 
904
func _(x (((((int))))))
 
905
func _(x, y (int))
 
906
func _(x, y (((((int))))))
 
907
 
 
908
func _() (int)
 
909
func _() ((int))
 
910
func _() ((((((int))))))
 
911
 
 
912
func _() (x int)
 
913
func _() (x (int))
 
914
func _() (x (((((int))))))
 
915
 
 
916
// special cases: some channel types require parentheses
 
917
func _(x chan(<-chan int))
 
918
func _(x (chan(<-chan int)))
 
919
func _(x ((((chan(<-chan int))))))
 
920
 
 
921
func _(x chan<-(chan int))
 
922
func _(x (chan<-(chan int)))
 
923
func _(x ((((chan<-(chan int))))))
 
924
 
 
925
// don't introduce comma after last parameter if the closing ) is on the same line
 
926
// even if the parameter type itself is multi-line (test cases from issue 4533)
 
927
func _(...interface{})
 
928
func _(...interface {
 
929
        m()
 
930
        n()
 
931
}) // no extra comma between } and )
 
932
 
 
933
func (t *T) _(...interface{})
 
934
func (t *T) _(...interface {
 
935
        m()
 
936
        n()
 
937
}) // no extra comma between } and )
 
938
 
 
939
func _(interface{})
 
940
func _(interface {
 
941
        m()
 
942
}) // no extra comma between } and )
 
943
 
 
944
func _(struct{})
 
945
func _(struct {
 
946
        x int
 
947
        y int
 
948
}) // no extra comma between } and )