Debian Codegraph @

gcc/testsuite/go.test/test/fixedbugs/issue32723.go

raw
1 // errorcheck
2
3 // Copyright 2019 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // Complex literal comparison
8
9 package p
10
11 const x = 1i
12 const y = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
13 const z = x < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
14
15 func f() {
16 _ = 1i < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
17 _ = 1i < 2 // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
18 _ = 1 < 2i // ERROR "invalid operation: .*not defined on untyped complex|non-ordered type"
19
20 c := 1i
21 _ = c < 2i // ERROR "invalid operation: .*not defined on complex128|non-ordered type"
22 }