2009-05-22 10:53:37 -06:00
|
|
|
// $G $D/$F.go && $L $F.$A && ./$A.out
|
|
|
|
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// Check that static interface conversion of
|
|
|
|
// interface value nil succeeds.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2010-09-03 18:36:13 -06:00
|
|
|
type R interface { R() }
|
|
|
|
type RW interface { R(); W() }
|
2009-05-22 10:53:37 -06:00
|
|
|
|
|
|
|
var e interface {}
|
2010-09-03 18:36:13 -06:00
|
|
|
var r R
|
|
|
|
var rw RW
|
2009-05-22 10:53:37 -06:00
|
|
|
|
|
|
|
func main() {
|
2010-09-03 18:36:13 -06:00
|
|
|
r = r
|
|
|
|
r = rw
|
|
|
|
e = r
|
|
|
|
e = rw
|
|
|
|
rw = rw
|
2009-05-22 10:53:37 -06:00
|
|
|
}
|