2015-03-18 16:34:40 +08:00
|
|
|
// RUN: env GOPATH=%S/Inputs llgoi < %s 2>&1 | FileCheck %s
|
2015-01-15 12:13:29 +08:00
|
|
|
|
|
|
|
// make sure user symbols do not conflict with imported source package
|
|
|
|
Answer := 1
|
|
|
|
|
|
|
|
import "foo"
|
|
|
|
|
2015-03-18 14:04:22 +08:00
|
|
|
// Test that importing binary after source works.
|
|
|
|
import "strconv"
|
|
|
|
|
2015-01-15 12:13:29 +08:00
|
|
|
foo.Answer()
|
2016-04-25 09:18:20 +08:00
|
|
|
// CHECK: 42
|
2015-01-15 12:13:29 +08:00
|
|
|
|
2015-03-18 14:04:22 +08:00
|
|
|
strconv.FormatBool(true)
|
2016-04-25 09:18:20 +08:00
|
|
|
// CHECK: true
|
2015-03-18 14:04:22 +08:00
|
|
|
|
2015-03-18 16:34:40 +08:00
|
|
|
var v1 strconv.NumError
|
|
|
|
var v2 strconv.NumError
|
|
|
|
|
|
|
|
// v1 and v2 should have the same type identity.
|
|
|
|
// CHECK-NOT: cannot assign
|
|
|
|
v1 = v2
|
|
|
|
|
|
|
|
// Method lookup relies on v1 having a consistent type.
|
|
|
|
v1.Error
|
|
|
|
|
2015-01-15 12:13:29 +08:00
|
|
|
import "foo_cgo"
|
|
|
|
// CHECK: foo_cgo: cannot load cgo package
|