Skip to content

cmd/gc: inconsistent handling of a 'if' clause with a boxed bool variable #7251

@gopherbot

Description

@gopherbot

by rafal.jeczalik:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
http://play.golang.org/p/qgs2Q1ydez

What is the expected output?
OK
OK

What do you see instead?
invalid operation: b && (i == 0 || i == 1) (mismatched types BoxedBool and bool)

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
OS X 10.9

Which version are you using?  (run 'go version')
go version devel +459f7bc40d85 Mon Feb 03 11:05:51 2014 -0800 darwin/amd64

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions