1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:57:58 -07:00

bug275: cannot apply real() to a complex array element

R=r, ken2
CC=golang-dev
https://golang.org/cl/1260041
This commit is contained in:
Robert Griesemer 2010-05-19 13:10:00 -07:00
parent b198c8612e
commit ce7487baa8
2 changed files with 24 additions and 0 deletions

20
test/bugs/bug275.go Normal file
View File

@ -0,0 +1,20 @@
// $G $D/$F.go || echo BUG should compile
// 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.
// This is a test case for issue 788.
package main
func main() {
var a [1]complex64
t := a[0]
_ = real(t) // this works
_ = real(a[0]) // this doesn't
}
// bug275.go:17: internal compiler error: subnode not addable

View File

@ -180,3 +180,7 @@ BUG: bug260 failed
=========== bugs/bug274.go
BUG: errchk: command succeeded unexpectedly
=========== bugs/bug275.go
bugs/bug275.go:17: internal compiler error: subnode not addable
BUG should compile