2018-07-05 17:44:30 -06:00
|
|
|
// Copyright 2016 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.
|
|
|
|
|
2016-05-03 17:23:24 -06:00
|
|
|
package depBase
|
2015-04-14 04:03:21 -06:00
|
|
|
|
2016-10-25 20:57:58 -06:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"reflect"
|
|
|
|
)
|
|
|
|
|
2017-01-24 21:19:36 -07:00
|
|
|
var SlicePtr interface{} = &[]int{}
|
|
|
|
|
2015-04-14 04:03:21 -06:00
|
|
|
var V int = 1
|
|
|
|
|
2015-05-24 22:13:50 -06:00
|
|
|
var HasMask []string = []string{"hi"}
|
|
|
|
|
|
|
|
type HasProg struct {
|
|
|
|
array [1024]*byte
|
|
|
|
}
|
|
|
|
|
2016-05-03 17:23:24 -06:00
|
|
|
type Dep struct {
|
|
|
|
X int
|
|
|
|
}
|
|
|
|
|
2016-05-26 21:41:55 -06:00
|
|
|
func (d *Dep) Method() int {
|
2016-10-25 20:57:58 -06:00
|
|
|
// This code below causes various go.itab.* symbols to be generated in
|
|
|
|
// the shared library. Similar code in ../exe/exe.go results in
|
2017-11-02 23:48:43 -06:00
|
|
|
// exercising https://golang.org/issues/17594
|
2016-10-25 20:57:58 -06:00
|
|
|
reflect.TypeOf(os.Stdout).Elem()
|
2016-05-26 21:41:55 -06:00
|
|
|
return 10
|
|
|
|
}
|
|
|
|
|
2015-04-14 04:03:21 -06:00
|
|
|
func F() int {
|
2016-06-01 17:07:55 -06:00
|
|
|
defer func() {}()
|
2015-04-14 04:03:21 -06:00
|
|
|
return V
|
|
|
|
}
|