~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to test/interface/explicit.go

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-07-08 05:52:37 UTC
  • mfrom: (29.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130708055237-at01839e0hp8z3ni
Tags: 2:1.1-1ubuntu1
016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
var t *T
17
17
 
 
18
type X int
 
19
 
 
20
func (x *X) M() {}
 
21
 
18
22
type I interface {
19
23
        M()
20
24
}
40
44
        // because i has an extra method
41
45
        // that t does not, so i cannot contain a t.
42
46
        i = t // ERROR "incompatible|missing M method"
43
 
        t = i // ERROR "incompatible|need type assertion"
 
47
        t = i // ERROR "incompatible|assignment$"
44
48
 
45
49
        i = i2 // ok
46
50
        i2 = i // ERROR "incompatible|missing N method"
66
70
 
67
71
var _ = m.(Int) // ERROR "impossible type assertion"
68
72
 
 
73
var _ = m.(X) // ERROR "pointer receiver"
 
74
 
69
75
var ii int
70
76
var jj Int
71
77