diff options
Diffstat (limited to 'testdata/interface.go')
-rw-r--r-- | testdata/interface.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testdata/interface.go b/testdata/interface.go index 0f66a30e5..d13399f36 100644 --- a/testdata/interface.go +++ b/testdata/interface.go @@ -40,6 +40,9 @@ func main() { // https://github.com/tinygo-org/tinygo/issues/453 _, _ = itf.(Empty) + var v Byter = FooByte(3) + println("Byte(): ", v.Byte()) + var n int var f float32 var interfaceEqualTests = []struct { @@ -266,3 +269,11 @@ type StaticBlocker interface { } type Empty interface{} + +type FooByte int + +func (f FooByte) Byte() byte { return byte(f) } + +type Byter interface { + Byte() uint8 +} |