1
// $G $D/$F.go && $L $F.$A && ./$A.out
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.
11
func typeof(x interface{}) string { return reflect.Typeof(x).String() }
13
func f() int { return 0 }
15
func g() int { return 0 }
19
var m = map[string]T{"f": f}
30
if t := typeof(f); t != want {
31
println("type of f is", t, "want", want)
36
if t := typeof(+a); t != want {
37
println("type of +a is", t, "want", want)
40
if t := typeof(a + 0); t != want {
41
println("type of a+0 is", t, "want", want)