OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.test/] [test/] [interface/] [embed0.go] - Blame information for rev 700

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// true # used by embed1.go
2
 
3
// Copyright 2009 The Go Authors. All rights reserved.
4
// Use of this source code is governed by a BSD-style
5
// license that can be found in the LICENSE file.
6
 
7
// Check that embedded interface types can have local methods.
8
 
9
package p
10
 
11
type T int
12
func (t T) m() {}
13
 
14
type I interface { m() }
15
type J interface { I }
16
 
17
func main() {
18
        var i I
19
        var j J
20
        var t T
21
        i = t
22
        j = t
23
        _ = i
24
        _ = j
25
        i = j
26
        _ = i
27
        j = i
28
        _ = j
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.