go/src/go/printer/testdata/contracts.golden

69 lines
1.0 KiB
Plaintext

// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package contracts
contract _(){}
contract _(A, B, C){}
contract (
C0(){}
C1(T){}
C2(A, B, C){}
)
contract _(T) {
T int
T float32, string, struct{}
(C0)
C0()
C1(T)
C2(T, T, T)
T m()
T int
}
contract _(A, B, C) {
A a() // only a will be printed for now
B a()
// a 1st comment
// a 2nd comment
C a()
}
contract _(A, Aa, Aaaa, Aaaaa) {
A m()
Aa m()
*Aaa m()
*Aaaa m()
Aaaaa int
A string
Aaaaa float32
}
type _(type T) interface{}
type _(type T) interface {
m(T)
}
type _ interface{ type int } // one-liner
type _ interface {
// TODO(gri) comments before type lists are not handled correctly yet
m1()
type int
type bool, string, error
m2()
m3()
type float32, float64, complex64, complex128
m4()
}
type _(type T) struct{}
type _(type A C) struct{}
type _(type A, B, C C) struct{}
func _(type T)() {}
func _(type A C)() {}
func _(type A, B, C C)() {}