Before this change, binding unsupported basic types such as uint failed with an error. Instead, add them to the list of ignored types so that no error is generated and a comment is generated explaining why the offending function, constant or variable was skipped. Unsigned integers are probably easy to support in ObjC, but leave them unsupported for now. While here, improve the printing of the ignored types in the explaining comments. Fixes golang/go#24762 Change-Id: I0d9ab471b2245728270f6ee588f554d4a105d500 Reviewed-on: https://go-review.googlesource.com/105377 Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
60 lines
886 B
Go
60 lines
886 B
Go
// 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.
|
|
|
|
// package ignore tests that exported, but otherwise
|
|
// unsupported functions, variables, fields and methods
|
|
// are ignored by the generators
|
|
package ignore
|
|
|
|
var Var interface{}
|
|
|
|
type (
|
|
NamedString string
|
|
)
|
|
|
|
const NamedConst NamedString = "foo"
|
|
|
|
var V interface{}
|
|
|
|
func Argument(_ interface{}) {
|
|
}
|
|
|
|
func Result() interface{} {
|
|
return nil
|
|
}
|
|
|
|
type S struct {
|
|
F interface{}
|
|
}
|
|
|
|
type (
|
|
F func()
|
|
)
|
|
|
|
func (_ *S) Argument(_ interface{}) {
|
|
}
|
|
|
|
func (_ *S) Result() interface{} {
|
|
return nil
|
|
}
|
|
|
|
type I interface {
|
|
Argument(_ interface{})
|
|
Result() interface{}
|
|
}
|
|
|
|
var (
|
|
Uint uint
|
|
Uint32 uint32
|
|
Uint64 uint64
|
|
C64 complex64 = 0
|
|
C128 complex128 = 0
|
|
)
|
|
|
|
const (
|
|
Cuint uint = 0
|
|
Cuint32 uint32 = 0
|
|
Cuint64 uint64 = 0
|
|
)
|