2018-07-06 09:14:30 +09:30
|
|
|
// 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-04 11:23:24 +12:00
|
|
|
package depBase
|
2015-04-14 12:03:21 +02:00
|
|
|
|
2016-10-26 15:57:58 +13:00
|
|
|
import (
|
|
|
|
|
"os"
|
|
|
|
|
"reflect"
|
|
|
|
|
)
|
|
|
|
|
|
2017-01-24 20:19:36 -08:00
|
|
|
var SlicePtr interface{} = &[]int{}
|
|
|
|
|
|
2015-04-14 12:03:21 +02:00
|
|
|
var V int = 1
|
|
|
|
|
|
2015-05-25 16:13:50 +12:00
|
|
|
var HasMask []string = []string{"hi"}
|
|
|
|
|
|
|
|
|
|
type HasProg struct {
|
|
|
|
|
array [1024]*byte
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-04 11:23:24 +12:00
|
|
|
type Dep struct {
|
|
|
|
|
X int
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-27 15:41:55 +12:00
|
|
|
func (d *Dep) Method() int {
|
2016-10-26 15:57:58 +13: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-03 05:48:43 +00:00
|
|
|
// exercising https://golang.org/issues/17594
|
2016-10-26 15:57:58 +13:00
|
|
|
reflect.TypeOf(os.Stdout).Elem()
|
2016-05-27 15:41:55 +12:00
|
|
|
return 10
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-14 12:03:21 +02:00
|
|
|
func F() int {
|
2016-06-02 11:07:55 +12:00
|
|
|
defer func() {}()
|
2015-04-14 12:03:21 +02:00
|
|
|
return V
|
|
|
|
|
}
|