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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug372
2
 
3
// Copyright 2011 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
// Issue 2355
8
package main
9
 
10
type T struct {}
11
func (T) m() string { return "T" }
12
 
13
type TT struct {
14
        T
15
        m func() string
16
}
17
 
18
 
19
func ff() string { return "ff" }
20
 
21
func main() {
22
        var tt TT
23
        tt.m = ff
24
 
25
        if tt.m() != "ff" {
26
                println(tt.m(), "!= \"ff\"")
27
        }
28
}

powered by: WebSVN 2.1.0

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