diff options
author | Russ Cox <rsc@golang.org> | 2009-03-12 19:04:38 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-03-12 19:04:38 -0700 |
commit | 2897f94b95d5abccd3de6d5c189186beb979400b (patch) | |
tree | 215ba82d2713550ef0ead44a627dd78579275bfa /test/fixedbugs/bug090.go | |
parent | b1d23c9a15da584630ca6c923cd863cab779ed48 (diff) | |
download | go-2897f94b95d5abccd3de6d5c189186beb979400b.tar.gz |
make 6g constants behave as ken proposes. (i hope.)
various bug fixes and tests involving constants.
test/const1.go is the major new test case.
R=ken
OCL=26216
CL=26224
Diffstat (limited to 'test/fixedbugs/bug090.go')
-rw-r--r-- | test/fixedbugs/bug090.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/fixedbugs/bug090.go b/test/fixedbugs/bug090.go index 0654cff9d..2b6f7deb8 100644 --- a/test/fixedbugs/bug090.go +++ b/test/fixedbugs/bug090.go @@ -33,13 +33,14 @@ func main() { f = f3div2; assert(f == f3div2, "f == f3div2"); - i = f3div2; // BUG: probably shouldn't compile + i = f3div2; // ERROR "truncate" assert(i == c3div2, "i == c3div2 from f3div2"); - assert(i != f3div2, "i != f3div2"); // BUG: certainly shouldn't fail + assert(i != f3div2, "i != f3div2"); // ERROR "truncate" const g float64 = 1.0; - i = g; // BUG: shouldn't compile + i = g; // ERROR "convert" const h float64 = 3.14; - i = h; // BUG: certainly shouldn't compile + i = h; // ERROR "convert" + i = int(h); // ERROR "truncate" } |