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
69353f0a
Commit
69353f0a
authored
Aug 07, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix erroneous code in bugs; reported by iant.
also rob1.go runs, so fix its status. R=gri,iant OCL=13957 CL=13957
parent
882ac638
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
test/fixedbugs/bug056.go
test/fixedbugs/bug056.go
+1
-1
test/golden.out
test/golden.out
+1
-0
test/ken/rob1.go
test/ken/rob1.go
+7
-6
test/ken/robfunc.go
test/ken/robfunc.go
+1
-1
No files found.
test/fixedbugs/bug056.go
View file @
69353f0a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
package
main
package
main
func
frexp
()
(
int
,
double
)
{
func
frexp
()
(
a
int
,
b
double
)
{
return
1
,
2.0
return
1
,
2.0
}
}
...
...
test/golden.out
View file @
69353f0a
...
@@ -81,6 +81,7 @@ Hello World!
...
@@ -81,6 +81,7 @@ Hello World!
=========== ken/ptrvar.go
=========== ken/ptrvar.go
=========== ken/rob1.go
=========== ken/rob1.go
9876543210
=========== ken/rob2.go
=========== ken/rob2.go
(defn foo (add 12 34))
(defn foo (add 12 34))
...
...
test/ken/rob1.go
View file @
69353f0a
...
@@ -8,7 +8,7 @@ package main
...
@@ -8,7 +8,7 @@ package main
type
Item
interface
type
Item
interface
{
{
Print
_BUG
func
();
Print
();
}
}
type
ListItem
struct
type
ListItem
struct
...
@@ -42,7 +42,7 @@ Print()
...
@@ -42,7 +42,7 @@ Print()
{
{
i
:=
list
.
head
;
i
:=
list
.
head
;
for
i
!=
nil
{
for
i
!=
nil
{
i
.
item
.
Print
_BUG
();
i
.
item
.
Print
();
i
=
i
.
next
;
i
=
i
.
next
;
}
}
}
}
...
@@ -54,14 +54,14 @@ type Integer struct
...
@@ -54,14 +54,14 @@ type Integer struct
}
}
func
(
this
*
Integer
)
func
(
this
*
Integer
)
Init
_BUG
(
i
int
)
*
Integer
Init
(
i
int
)
*
Integer
{
{
this
.
val
=
i
;
this
.
val
=
i
;
return
this
;
return
this
;
}
}
func
(
this
*
Integer
)
func
(
this
*
Integer
)
Print
_BUG
()
Print
()
{
{
print
this
.
val
;
print
this
.
val
;
}
}
...
@@ -73,9 +73,10 @@ main()
...
@@ -73,9 +73,10 @@ main()
list
.
Init
();
list
.
Init
();
for
i
:=
0
;
i
<
10
;
i
=
i
+
1
{
for
i
:=
0
;
i
<
10
;
i
=
i
+
1
{
integer
:=
new
(
Integer
);
integer
:=
new
(
Integer
);
integer
.
Init
_BUG
(
i
);
integer
.
Init
(
i
);
list
.
Insert
(
integer
);
//BUG: this is the failing line
list
.
Insert
(
integer
);
}
}
list
.
Print
();
list
.
Print
();
print
"
\n
"
;
}
}
test/ken/robfunc.go
View file @
69353f0a
...
@@ -35,7 +35,7 @@ func f6(a int) (r int) {
...
@@ -35,7 +35,7 @@ func f6(a int) (r int) {
return
6
;
return
6
;
}
}
func
f7
(
a
int
)
(
int
,
float
)
{
func
f7
(
a
int
)
(
x
int
,
y
float
)
{
return
7
,
7.0
;
return
7
,
7.0
;
}
}
...
...
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