Standard library / reflect

reflect.Value.CanComplex()

Report whether Complex may be called without panic. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func (v Value) CanComplex() bool

Return Value

bool

Report whether Complex may be called without panic.

Working Example

Example Snippetgo
package main
import (  "fmt"  "reflect")
func main() { fmt.Println(reflect.ValueOf(complex64(1)).CanComplex()) }
Go Reference