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
83a79851
Commit
83a79851
authored
Nov 05, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more on t,ok = I.(T)
R=r OCL=18599 CL=18599
parent
48d111f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
walk.c
src/cmd/gc/walk.c
+16
-0
No files found.
src/cmd/gc/walk.c
View file @
83a79851
...
@@ -469,6 +469,7 @@ loop:
...
@@ -469,6 +469,7 @@ loop:
case
OCONV
:
case
OCONV
:
if
(
cl
==
2
&&
cr
==
1
)
{
if
(
cl
==
2
&&
cr
==
1
)
{
// a,b = i.(T)
// a,b = i.(T)
walktype
(
r
->
left
,
Erv
);
if
(
r
->
left
==
N
)
if
(
r
->
left
==
N
)
break
;
break
;
et
=
isandss
(
r
->
type
,
r
->
left
);
et
=
isandss
(
r
->
type
,
r
->
left
);
...
@@ -2964,6 +2965,20 @@ multi:
...
@@ -2964,6 +2965,20 @@ multi:
n
=
list
(
n
,
a
);
n
=
list
(
n
,
a
);
break
;
break
;
case
OCONV
:
// a,b := i.(T)
if
(
cl
!=
2
)
goto
badt
;
walktype
(
nr
->
left
,
Erv
);
if
(
!
isinter
(
nr
->
left
->
type
))
goto
badt
;
// a,b = iface
a
=
old2new
(
nl
->
left
,
nr
->
type
);
n
=
a
;
a
=
old2new
(
nl
->
right
,
types
[
TBOOL
]);
n
=
list
(
n
,
a
);
break
;
case
ORECV
:
case
ORECV
:
if
(
cl
!=
2
)
if
(
cl
!=
2
)
goto
badt
;
goto
badt
;
...
@@ -2975,6 +2990,7 @@ multi:
...
@@ -2975,6 +2990,7 @@ multi:
n
=
a
;
n
=
a
;
a
=
old2new
(
nl
->
right
,
types
[
TBOOL
]);
a
=
old2new
(
nl
->
right
,
types
[
TBOOL
]);
n
=
list
(
n
,
a
);
n
=
list
(
n
,
a
);
break
;
}
}
n
=
rev
(
n
);
n
=
rev
(
n
);
return
n
;
return
n
;
...
...
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