mirror of
https://github.com/golang/go
synced 2024-11-12 10:30:23 -07:00
- fixed bug that wasn't caught by 6g (but by gccgo)
R=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=17380 CL=17380
This commit is contained in:
parent
f39b518bcb
commit
071e963e0e
@ -142,7 +142,7 @@ func ExprType(x *Node.Expr) *Node.Type {
|
|||||||
func (P *Parser) NoType(x *Node.Expr) *Node.Expr {
|
func (P *Parser) NoType(x *Node.Expr) *Node.Expr {
|
||||||
if x != nil && x.tok == Scanner.TYPE {
|
if x != nil && x.tok == Scanner.TYPE {
|
||||||
P.Error(x.pos, "expected expression, found type");
|
P.Error(x.pos, "expected expression, found type");
|
||||||
x = Node.NewLit(x.pos, Scanner.INT, 0);
|
x = Node.NewLit(x.pos, Scanner.INT, "");
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user