forked from OSchip/llvm-project
31 lines
323 B
Plaintext
31 lines
323 B
Plaintext
// RUN: llgoi < %s 2>&1 | FileCheck %s
|
|
|
|
x := 3
|
|
x
|
|
// CHECK: 3
|
|
|
|
x + x
|
|
// CHECK: 6
|
|
|
|
x * x
|
|
// CHECK: 9
|
|
|
|
x = 4
|
|
x + x
|
|
// CHECK: 8
|
|
|
|
x := true
|
|
// CHECK: cannot assign {{.*}} to x (variable of type int)
|
|
|
|
x, y := func() (int, int) {
|
|
return 1, 2
|
|
}()
|
|
// CHECK: 1
|
|
// CHECK: 2
|
|
|
|
x, _ = func() (int, int) {
|
|
return 3, 4
|
|
}()
|
|
x
|
|
// CHECK: 3
|