1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:44:44 -07:00
go/pointer
Alan Donovan d7a9805478 go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc}
Various reflect operations permit assignability conversions,
i.e. their internals behave unlike y=x.(T) which unpacks only
those interface values in x that are identical to T.

We split typeAssertConstraint y=x.(T) into two constraints:
1) typeFilter, for when T is an interface type and no
   representation change occurs.
2) unpack, for when T is a concrete type and the payload of the
   tagged object is extracted.  This constraint has an 'exact'
   parameter indicating whether to use the predicate
   IsIdentical (for type assertions) or
   IsAssignable (for reflect operators).

+ Tests.

R=crawshaw
CC=golang-dev
https://golang.org/cl/14547043
2013-10-14 13:53:41 -04:00
..
testdata go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
analysis.go go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
api.go go.tools/pointer: minor API simplifications. 2013-09-30 12:39:54 -04:00
callgraph.go go.tools/pointer: make sole callsite available to intrinsics in non-shared contours. 2013-10-09 12:41:55 -04:00
doc.go go.tools/pointer: make os.Args point to something. 2013-10-01 09:46:33 -04:00
example_test.go go.tools/importer: expose CreatePackage method. 2013-10-10 12:37:49 -04:00
gen.go go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
intrinsics.go go.tools/pointer: make sole callsite available to intrinsics in non-shared contours. 2013-10-09 12:41:55 -04:00
labels.go go.tools/pointer: make os.Args point to something. 2013-10-01 09:46:33 -04:00
pointer_test.go go.tools/pointer: more reflection operators. 2013-10-11 15:34:19 -04:00
print.go go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
reflect.go go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
solve.go go.tools/pointer: use assignable not identical type predicate in reflect.{Send,SetMapIndex,etc} 2013-10-14 13:53:41 -04:00
TODO go.tools/pointer: make os.Args point to something. 2013-10-01 09:46:33 -04:00
util.go go.tools/pointer: reflect, part 2: channels. 2013-09-23 16:13:01 -04:00