Fixes #245.
R=ken2
https://golang.org/cl/164094
checkwidth(t->down);
break;
case TFORW: // should have been filled in
+ yyerror("invalid recursive type %T", t);
+ w = 1; // anything will do
+ break;
case TANY:
// dummy type; should be replaced before use.
if(!debug['A'])
case ODCLTYPE:
ok |= Etop;
typecheck(&n->left, Etype);
+ if(!incannedimport)
+ checkwidth(n->left->type);
goto ret;
}
--- /dev/null
+// errchk $G $D/$F.go
+
+// Copyright 2009 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 main
+
+type T T // ERROR "recursive"
+