github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/types2/predicates.go (about) 1 // Copyright 2012 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This file implements commonly used type predicates. 6 7 package types2 8 9 // IsInterface reports whether t is an interface type. 10 func IsInterface(t Type) bool 11 12 // Comparable reports whether values of type T are comparable. 13 func Comparable(T Type) bool 14 15 // Default returns the default "typed" type for an "untyped" type; 16 // it returns the incoming type for all other types. The default type 17 // for untyped nil is untyped nil. 18 func Default(t Type) Type