blob: 3619fb4ba9a4e544d8aa49b20d3cdbcefe399d5a [file] [log] [blame]
// RUN: env GOPATH=%S/Inputs llgoi < %s 2>&1 | FileCheck %s
// make sure user symbols do not conflict with imported source package
Answer := 1
import "foo"
// Test that importing binary after source works.
import "strconv"
// CHECK: 42
// CHECK: true
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.
import "foo_cgo"
// CHECK: foo_cgo: cannot load cgo package