Example #1
0
func main() {
	call(A)
	call(B)

	nop()
	nop()

	call2(func() {
		// called twice from main.call2,
		// but call2 is not context sensitive (yet).
	})

	print("builtin")
	_ = string("type conversion")
	call(nil)
	if false {
		main()
	}
	var nilFunc func()
	nilFunc()
	var i interface {
		f()
	}
	i.f()

	lib.Func()
}
Example #2
0
func main() {
	const c = lib.Const // @describe ref-const "Const"
	lib.Func()          // @describe ref-func "Func"
	lib.Var++           // @describe ref-var "Var"
	var t lib.Type      // @describe ref-type "Type"
	p := t.Method(&a)   // @describe ref-method "Method"

	print(*p + 1) // @describe p "p "

	var _ lib.Type // @describe ref-pkg "lib"
}