2009-03-13 02:04:38 +00:00
|
|
|
// errchk $G $D/$F.go
|
|
|
|
|
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
const (
|
2010-09-04 00:36:13 +00:00
|
|
|
A int = 1
|
2009-03-17 04:48:07 +00:00
|
|
|
B byte; // ERROR "type without expr|expected .=."
|
2009-03-13 02:04:38 +00:00
|
|
|
)
|
2012-02-11 05:50:56 +00:00
|
|
|
|
|
|
|
const LargeA = 1000000000000000000
|
|
|
|
const LargeB = LargeA * LargeA * LargeA
|
2012-02-15 23:19:42 +00:00
|
|
|
const LargeC = LargeB * LargeB * LargeB // ERROR "constant multiplication overflow"
|
|
|
|
|
|
|
|
const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // ERROR "constant shift overflow"
|