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 {
12 val, typ, indir := sys.Reflect(x);
26 var m = map[string] T {
39 if t := typeof(f); t != want {
40 panicln("type of f is", t, "want", want);
44 if t := typeof(+a); t != want {
45 panicln("type of +a is", t, "want", want);
47 if t := typeof(a+0); t != want {
48 panicln("type of a+0 is", t, "want", want);
50 if t := typeof(a+b); t != want {
51 panicln("type of a+b is", t, "want", want);