github.com/yanyiwu/go@v0.0.0-20150106053140-03d6637dbb7f/test/interface/convert2.go (about) 1 // run 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 // Test static interface conversion of interface value nil. 8 9 package main 10 11 type R interface { R() } 12 type RW interface { R(); W() } 13 14 var e interface {} 15 var r R 16 var rw RW 17 18 func main() { 19 r = r 20 r = rw 21 e = r 22 e = rw 23 rw = rw 24 }