Skip to content

reflect: v.Method(i).Interface() not supported #1517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rogpeppe opened this issue Feb 15, 2011 · 9 comments
Closed

reflect: v.Method(i).Interface() not supported #1517

rogpeppe opened this issue Feb 15, 2011 · 9 comments
Milestone

Comments

@rogpeppe
Copy link
Contributor

The attached code should print "hello 99"; instead
it prints other number. It looks as if the reflect
package isn't returning a correctly curried method function value.

6g darwin acf4d0a7130f+ tip

Attachments:

  1. tst.go (590 bytes)
@rsc
Copy link
Contributor

rsc commented Feb 15, 2011

Comment 1:

Owner changed to r...@golang.org.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Feb 15, 2011

Comment 2:

You are asking reflect to do something that Go the language does not:
give you a curried method for the expression x.Foo.  
I will make Interface panic in this case for now.  We can revisit it
once x.Foo is valid Go.  I don't want to be in a position where reflect
is being used to circumvent shortcomings in the language itself.

Status changed to LongTerm.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 5:

Labels changed: added priority-later.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 6:

Labels changed: added go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 7:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 8:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Mar 15, 2013

Comment 9:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Mar 21, 2013

Comment 10:

This issue was closed by revision 3be7036.

Status changed to Fixed.

@rogpeppe
Copy link
Contributor Author

Comment 11:

Yay!

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants