• Russ Cox's avatar
    reflect: add Type.Implements, Type.AssignableTo, Value.CallSlice; make Set match Go · e1ee3b5d
    Russ Cox authored
    This CL makes reflect require that values be assignable to the target type
    in exactly the same places where that is the rule in Go.  It also adds
    the Implements and AssignableTo methods so that callers can check
    the types themselves so as to avoid a panic.
    
    Before this CL, reflect required strict type identity.
    
    This CL expands Call to accept and correctly marshal arbitrary
    argument lists for variadic functions; it introduces CallSlice for use
    in the case where the slice for the variadic argument is already known.
    
    Fixes #327.
    Fixes #1212.
    
    R=r, dsymonds
    CC=golang-dev
    https://golang.org/cl/4439058
    e1ee3b5d
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...