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
a9af1841
Commit
a9af1841
authored
Aug 20, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugs related to constat types
R=r DELTA=10 (6 added, 4 deleted, 0 changed) OCL=14348 CL=14348
parent
b59b551b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
bug090.go
test/bugs/bug090.go
+6
-0
const.go
test/const.go
+0
-4
No files found.
test/bugs/bug090.go
View file @
a9af1841
...
@@ -36,4 +36,10 @@ func main() {
...
@@ -36,4 +36,10 @@ func main() {
i
=
f3div2
;
// BUG: probably shouldn't compile
i
=
f3div2
;
// BUG: probably shouldn't compile
assert
(
i
==
c3div2
,
"i == c3div2 from f3div2"
);
assert
(
i
==
c3div2
,
"i == c3div2 from f3div2"
);
assert
(
i
!=
f3div2
,
"i != f3div2"
);
// BUG: certainly shouldn't fail
assert
(
i
!=
f3div2
,
"i != f3div2"
);
// BUG: certainly shouldn't fail
const
g
float64
=
1.0
;
i
=
g
;
// BUG: shouldn't compile
const
h
float64
=
3.14
;
i
=
h
;
// BUG: certainly shouldn't compile
}
}
test/const.go
View file @
a9af1841
...
@@ -89,10 +89,6 @@ func floats() {
...
@@ -89,10 +89,6 @@ func floats() {
assert
(
i
==
f0
,
"i == f0"
);
assert
(
i
==
f0
,
"i == f0"
);
i
=
fm1
;
i
=
fm1
;
assert
(
i
==
fm1
,
"i == fm1"
);
assert
(
i
==
fm1
,
"i == fm1"
);
i
=
f1
;
assert
(
i
==
f1
,
"i == f1"
);
i
=
f1e3
;
assert
(
i
==
f1e3
,
"i == f1e3"
);
// verify that all are assignable as floats
// verify that all are assignable as floats
var
f
float64
;
var
f
float64
;
...
...
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