Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
05a1eb1a
Commit
05a1eb1a
authored
Dec 03, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: recursive type error
Fixes #245. R=ken2
https://golang.org/cl/164094
parent
41861a88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
align.c
src/cmd/gc/align.c
+3
-0
typecheck.c
src/cmd/gc/typecheck.c
+2
-0
bug224.go
test/fixedbugs/bug224.go
+10
-0
No files found.
src/cmd/gc/align.c
View file @
05a1eb1a
...
...
@@ -205,6 +205,9 @@ dowidth(Type *t)
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'
])
...
...
src/cmd/gc/typecheck.c
View file @
05a1eb1a
...
...
@@ -1039,6 +1039,8 @@ reswitch:
case
ODCLTYPE
:
ok
|=
Etop
;
typecheck
(
&
n
->
left
,
Etype
);
if
(
!
incannedimport
)
checkwidth
(
n
->
left
->
type
);
goto
ret
;
}
...
...
test/fixedbugs/bug224.go
0 → 100644
View file @
05a1eb1a
// 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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment