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
033682de
Commit
033682de
authored
Aug 05, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround for compiler bug: len(a) is zero
TBR=iant OCL=13873 CL=13873
parent
4a0765b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
powser1.go
test/chan/powser1.go
+3
-3
No files found.
test/chan/powser1.go
View file @
033682de
...
...
@@ -624,8 +624,9 @@ func check(U PS, c *rat, count int, str string) {
}
}
const
N
=
10
func
checka
(
U
PS
,
a
*
[]
*
rat
,
str
string
)
{
for
i
:=
0
;
i
<
len
(
a
)
;
i
++
{
for
i
:=
0
;
i
<
N
;
i
++
{
check
(
U
,
a
[
i
],
1
,
str
);
}
}
...
...
@@ -648,8 +649,7 @@ func main() {
check
(
Ones
,
one
,
5
,
"Ones"
);
check
(
Add
(
Ones
,
Ones
),
itor
(
2
),
0
,
"Add Ones Ones"
);
// 1 1 1 1 1
check
(
Add
(
Ones
,
Twos
),
itor
(
3
),
0
,
"Add Ones Twos"
);
// 3 3 3 3 3
const
N
=
5
;
a
:=
new
([
10
]
*
rat
);
a
:=
new
([
N
]
*
rat
);
d
:=
Diff
(
Ones
);
// BUG: want array initializer
for
i
:=
0
;
i
<
N
;
i
++
{
...
...
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