diff options
author | Robert Griesemer <gri@golang.org> | 2008-08-20 15:43:12 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2008-08-20 15:43:12 -0700 |
commit | beccdd7c059efcc1268ec2ebc73251607aba4e5e (patch) | |
tree | 3323ec5344daf0f6f4ef94155ea7db56ab75d876 /test | |
parent | 0b43c41709593beb31b6900c1af0c566e02c3f19 (diff) | |
download | go-beccdd7c059efcc1268ec2ebc73251607aba4e5e.tar.gz |
bugs related to constat types
R=r
DELTA=10 (6 added, 4 deleted, 0 changed)
OCL=14348
CL=14348
Diffstat (limited to 'test')
-rw-r--r-- | test/bugs/bug090.go | 6 | ||||
-rw-r--r-- | test/const.go | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/bugs/bug090.go b/test/bugs/bug090.go index bcb9095ff..0654cff9d 100644 --- a/test/bugs/bug090.go +++ b/test/bugs/bug090.go @@ -36,4 +36,10 @@ func main() { i = f3div2; // BUG: probably shouldn't compile assert(i == c3div2, "i == c3div2 from f3div2"); 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 } diff --git a/test/const.go b/test/const.go index ced52dc22..f16a8c4b7 100644 --- a/test/const.go +++ b/test/const.go @@ -89,10 +89,6 @@ func floats() { assert(i == f0, "i == f0"); 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 var f float64; |