https://github.com/anlhord/go/commit/1eef19b08a793e8d8e83eb2114d9e77ef72bfc92
so i've got this toy.go in my repo
https://github.com/anlhord/generic/blob/master/toy/toy.go
I get
./toy.go:95: cannot use &a (type **[]int) as type *generic.Container in
argument to Init
./toy.go:96: cannot use &a (type **[]int) as type *generic.Container in
argument to Destroy
./toy.go:97: cannot use &b (type **[]byte) as type *generic.Container in
argument to Init
./toy.go:98: cannot use &b (type **[]byte) as type *generic.Container in
argument to Destroy
./toy.go:99: cannot use &c (type **interface {}) as type *generic.Container
in argument to Init
./toy.go:100: cannot use &c (type **interface {}) as type
*generic.Container in argument to Destroy
./toy.go:106: cannot use &a (type **[]int) as type *generic.Container in
argument to At
now I want to break the type safety and to cast **[]int and **interface{}
to my *generic.Container type.
looked at ./cmd/gc/typecheck.c , seems fairly complex.
please give me some advice
thanks
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.