Skip to content

go/types: can shift complex numbers #11594

Closed
@dvyukov

Description

@dvyukov

gotype successfully compiles the following program:

package a
var a = complex64(1) << 2

gccgo also compiles it. gc rejects it saying:

invalid operation: complex64(1) << 2 (shift of type complex64)

Spec says that lhs of shift must be an integer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions