Standard library / go/types
go/types.IsComplex
BasicInfo mask for complex basic types. Test using bitwise AND, not equality. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
const IsComplex BasicInfoWorking Example
Example Snippetgo
package main
import ( "fmt" "go/types")
func main() { fmt.Println(types.Typ[types.Complex128].Info()&types.IsComplex != 0) }