Standard library / go/types

go/types.Term.Tilde()

Reports whether the term uses underlying-type matching. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (t *Term) Tilde() bool

Return Value

bool

Reports whether the term uses underlying-type matching.

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/types")
func term() *types.Term { return types.NewTerm(true, types.Typ[types.Int]) }
func main() { v := term(); fmt.Println(v.Tilde()) }
Go Reference