}
if(isfat(n->type)) {
+ if(n->type->width < 0)
+ fatal("forgot to compute width for %T", n->type);
sgen(n, res, n->type->width);
goto ret;
}
}
if(isfat(n->type)) {
+ if(n->type->width < 0)
+ fatal("forgot to compute width for %T", n->type);
sgen(n, res, n->type->width);
goto ret;
}
// structs etc get handled specially
if(isfat(n->type)) {
+ if(n->type->width < 0)
+ fatal("forgot to compute width for %T", n->type);
sgen(n, res, n->type->width);
return;
}
pt->nod = n;
pt->sym = n->sym;
pt->sym->lastlineno = parserline();
+ pt->siggen = 0;
+ pt->printed = 0;
+ pt->deferwidth = 0;
+ pt->local = 0;
declare(n, PEXTERN);
checkwidth(pt);
}
// copy new type and clear fields
- // that don't come along
+ // that don't come along.
+ // anything zeroed here must be zeroed in
+ // typedcl2 too.
maplineno = n->type->maplineno;
embedlineno = n->type->embedlineno;
*n->type = *t;
--- /dev/null
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+import "./b"
+
+var Bar = b.Foo
--- /dev/null
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+type T interface{}
+
+func f() T { return nil }
+
+var Foo T = f()
--- /dev/null
+// $G $D/$F.dir/b.go && $G $D/$F.dir/a.go
+// rm -f a.$A b.$A
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1705.
+
+unused (see script at top of file)