Commit 84953bda authored by Russ Cox's avatar Russ Cox

fix newfn

R=ken
OCL=22173
CL=22173
parent e2862606
......@@ -2078,13 +2078,14 @@ Node*
newcompat(Node *n)
{
Node *r, *on;
Type *t, *t0;
Type *t;
t = n->type;
if(t == T)
goto bad;
switch(t->etype) {
case TFUNC:
case TSTRING:
case TMAP:
case TCHAN:
......
......@@ -10,5 +10,8 @@ func main()
{
f := new(()); // ERROR "new"
g := new((x int, f float) string); // ERROR "new"
h := new(()); // ok
h := new(*()); // ok
i := new(string); // ok
j := new(map[int]int); // ok
k := new(chan int); // ok
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment