2010-04-19 10:21:51 -06:00
|
|
|
// errchk $G -e $D/$F.go
|
|
|
|
|
|
|
|
// Copyright 2010 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
|
|
|
|
|
|
|
|
var (
|
|
|
|
f32 float32
|
|
|
|
f64 float64
|
|
|
|
|
2011-01-19 21:09:00 -07:00
|
|
|
c64 complex64
|
2010-04-19 10:21:51 -06:00
|
|
|
c128 complex128
|
|
|
|
)
|
2011-01-19 21:09:00 -07:00
|
|
|
|
2010-04-19 10:21:51 -06:00
|
|
|
func main() {
|
|
|
|
// ok
|
2011-01-19 21:09:00 -07:00
|
|
|
c64 = complex(f32, f32)
|
|
|
|
c128 = complex(f64, f64)
|
2010-04-19 10:21:51 -06:00
|
|
|
|
2011-01-19 21:09:00 -07:00
|
|
|
_ = complex128(0) // ok
|
|
|
|
_ = complex(f32, f64) // ERROR "complex"
|
|
|
|
_ = complex(f64, f32) // ERROR "complex"
|
2010-04-19 10:21:51 -06:00
|
|
|
}
|