Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1816)

Side by Side Diff: test/const2.go

Issue 5656082: code review 5656082: test: use testlib (first 100) (Closed)
Patch Set: diff -r e1704b98dff6 https://code.google.com/p/go/ Created 13 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/const1.go ('k') | test/const3.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // errchk $G $D/$F.go 1 // errorcheck
2 2
3 // Copyright 2009 The Go Authors. All rights reserved. 3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
6 6
7 package main 7 package main
8 8
9 const ( 9 const (
10 A int = 1 10 A int = 1
11 B byte; // ERROR "type without expr|expected .=." 11 B byte; // ERROR "type without expr|expected .=."
12 ) 12 )
13 13
14 const LargeA = 1000000000000000000 14 const LargeA = 1000000000000000000
15 const LargeB = LargeA * LargeA * LargeA 15 const LargeB = LargeA * LargeA * LargeA
16 const LargeC = LargeB * LargeB * LargeB // ERROR "constant multiplication overfl ow" 16 const LargeC = LargeB * LargeB * LargeB // ERROR "constant multiplication overfl ow"
17 17
18 const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // ERROR "constant shift o verflow" 18 const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // ERROR "constant shift o verflow"
OLDNEW
« no previous file with comments | « test/const1.go ('k') | test/const3.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b