Skip to content

go/types: complex(0, 0i) should be permitted #11669

Closed
@dvyukov

Description

@dvyukov

gc successfully compiles the following program:

package a
var e = complex(0, 0i)

while gotype rejects it with:

invalid argument: 0i (untyped complex constant 0) must be a float32, float64, or an untyped non-complex numeric constant

go version devel +9b04852 Sat Jul 11 00:08:50 2015 +0000 linux/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions