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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 700 jeremybenn
// errchk $G $D/$F.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
package main
8
 
9
type T struct {
10
        a int
11
}
12
type P *T
13
type P1 *T
14
 
15
func (p P) val() int   { return 1 } // ERROR "receiver.* pointer|invalid pointer or interface receiver"
16
func (p *P1) val() int { return 1 } // ERROR "receiver.* pointer|invalid pointer or interface receiver"
17
 
18
type I interface{}
19
type I1 interface{}
20
 
21
func (p I) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
22
func (p *I1) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
23
 
24
type Val interface {
25
        val() int
26
}
27
 
28
var _ = (*Val).val // ERROR "method"
29
 
30
var v Val
31
var pv = &v
32
 
33
var _ = pv.val()        // ERROR "method"

powered by: WebSVN 2.1.0

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