Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
a2ea790b
Commit
a2ea790b
authored
May 15, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug152: literal []slice{ } as range expression
R=ken OCL=28918 CL=28918
parent
13fbb1d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
test/bugs/bug152.go
test/bugs/bug152.go
+17
-0
test/golden.out
test/golden.out
+4
-1
No files found.
test/bugs/bug152.go
0 → 100644
View file @
a2ea790b
// $G $D/$F.go && $L $F.$A && ./$A.out
// 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
func
main
()
{
s
:=
0
;
for
i
,
v
:=
range
[]
int
{
1
}
{
s
+=
v
;
}
if
s
!=
1
{
println
(
"BUG: s ="
,
s
);
}
}
test/golden.out
View file @
a2ea790b
...
@@ -106,7 +106,7 @@ bugs/bug149.go:14: cannot convert []uint8 constant to string
...
@@ -106,7 +106,7 @@ bugs/bug149.go:14: cannot convert []uint8 constant to string
BUG: should compile
BUG: should compile
=========== bugs/bug150.go
=========== bugs/bug150.go
bugs/bug150.go:13: reorder2: too many func
a
tion calls evaluating parameters
bugs/bug150.go:13: reorder2: too many function calls evaluating parameters
BUG: bug150
BUG: bug150
=========== bugs/bug151.go
=========== bugs/bug151.go
...
@@ -115,6 +115,9 @@ bugs/bug151.go:10: illegal types for operand: CALL
...
@@ -115,6 +115,9 @@ bugs/bug151.go:10: illegal types for operand: CALL
S
S
BUG: bug151
BUG: bug151
=========== bugs/bug152.go
BUG: s = 0
=========== fixedbugs/bug016.go
=========== fixedbugs/bug016.go
fixedbugs/bug016.go:7: constant -3 overflows uint
fixedbugs/bug016.go:7: constant -3 overflows uint
...
...
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