R=ken2
CC=golang-dev
https://golang.org/cl/186232
t = n->type;
if(t != T) {
convlit(&e, t);
- if(!isint[t->etype] && !isfloat[t->etype] && t->etype != TSTRING)
+ if(!isint[t->etype] && !isfloat[t->etype] && t->etype != TSTRING && t->etype != TBOOL)
yyerror("invalid constant type %T", t);
}
n->val = e->val;
const e func() = 5 // ERROR "convert|wrong|incompatible"
const f struct{} = 6 // ERROR "convert|wrong|incompatible"
const g interface{} = 7 // ERROR "constant|wrong|incompatible"
+const h bool = false
+const i int = 2
+const j float = 5
func main() { println(a, b, c, d, e, f, g) }