diff options
author | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-01-19 23:09:00 -0500 |
commit | ed3592f95664c555d787d87b28ff783b846257e6 (patch) | |
tree | 9bfdc7720f6c491c1c293a4bd367abec2a1221f4 /test/interface | |
parent | 8d36be6d5ae904467a0be5e7dc3965581a3dbf73 (diff) | |
download | go-ed3592f95664c555d787d87b28ff783b846257e6.tar.gz |
delete float, complex - code changes
also:
cmplx -> complex
float64(1.0) -> 1.0
float64(1) -> 1.0
R=gri, r, gri1, r2
CC=golang-dev
http://codereview.appspot.com/3991043
Diffstat (limited to 'test/interface')
-rw-r--r-- | test/interface/explicit.go | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/interface/explicit.go b/test/interface/explicit.go index b952f8fc8..b6a582fff 100644 --- a/test/interface/explicit.go +++ b/test/interface/explicit.go @@ -51,21 +51,25 @@ func main() { t = T(e) // ERROR "need explicit|need type assertion|incompatible" } -type M interface { M() } +type M interface { + M() +} + var m M -var _ = m.(int) // ERROR "impossible type assertion" +var _ = m.(int) // ERROR "impossible type assertion" type Int int -func (Int) M(float) {} -var _ = m.(Int) // ERROR "impossible type assertion" +func (Int) M(float64) {} + +var _ = m.(Int) // ERROR "impossible type assertion" var ii int var jj Int -var m1 M = ii // ERROR "incompatible|missing" -var m2 M = jj // ERROR "incompatible|wrong type for M method" +var m1 M = ii // ERROR "incompatible|missing" +var m2 M = jj // ERROR "incompatible|wrong type for M method" -var m3 = M(ii) // ERROR "invalid|missing" -var m4 = M(jj) // ERROR "invalid|wrong type for M method" +var m3 = M(ii) // ERROR "invalid|missing" +var m4 = M(jj) // ERROR "invalid|wrong type for M method" |