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
9efd6b8a
Commit
9efd6b8a
authored
Apr 03, 2009
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compiler falut for forgetting
the assignment on a type switch R=r OCL=27048 CL=27048
parent
58f5f4f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
swt.c
src/cmd/gc/swt.c
+7
-0
No files found.
src/cmd/gc/swt.c
View file @
9efd6b8a
...
@@ -763,6 +763,13 @@ typeswitch(Node *sw)
...
@@ -763,6 +763,13 @@ typeswitch(Node *sw)
Case
*
c
,
*
c0
,
*
c1
;
Case
*
c
,
*
c0
,
*
c1
;
int
ncase
;
int
ncase
;
if
(
sw
->
ntest
==
nil
)
return
;
if
(
sw
->
ntest
->
right
==
nil
)
{
setlineno
(
sw
);
yyerror
(
"type switch must have an assignment"
);
return
;
}
walktype
(
sw
->
ntest
->
right
,
Erv
);
walktype
(
sw
->
ntest
->
right
,
Erv
);
if
(
!
istype
(
sw
->
ntest
->
right
->
type
,
TINTER
))
{
if
(
!
istype
(
sw
->
ntest
->
right
->
type
,
TINTER
))
{
yyerror
(
"type switch must be on an interface"
);
yyerror
(
"type switch must be on an interface"
);
...
...
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