Navigation Menu

Skip to content
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

Inconsistent symbols with ClassMirror constructors and ClassMirror newInstance #11161

Closed
sethladd opened this issue Jun 8, 2013 · 4 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-mirrors P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@sethladd
Copy link
Contributor

sethladd commented Jun 8, 2013

ClassMirror.constructors returns this:

Foo.bar, Foo.baz (as symbols, with classname.constructorname)

However, ClassMirror.newInstance wants a symbol of 'bar' or 'baz' (only the constructor names)

This means I can't take a symbol from constructors and use it with newInstance. I need to peel off the class name from the symbols coming from constructors.

Could we make these consistent?

@sethladd
Copy link
Contributor Author

sethladd commented Jun 8, 2013

(Assigning to Gilad because not sure if this is a bug in the implementation, or this is spec'ed behavior.)

@sethladd
Copy link
Contributor Author

sethladd commented Jun 8, 2013

Changed the title to: "Inconsistent symbols with ClassMirror constructors and ClassMirror newInstance".

@gbracha
Copy link
Contributor

gbracha commented Jun 10, 2013

This is a consequence of "spec drift". The original intent was to get names of the form 'Foo.bar', per the language spec for constructor names (7.6). However, with the introduction of Symbol the intent shifted to use 'bar' instead for simple names, and has not been implemented consistently.

We do need to settle this. Thanks for pointing it out.


Added Accepted label.

@sethladd
Copy link
Contributor Author

Thanks Gilad.


Removed Priority-Unassigned label.
Added Priority-Medium label.

@sethladd sethladd added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-mirrors labels Jun 11, 2013
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed accepted labels Feb 29, 2016
@a-siva a-siva added the closed-not-planned Closed as we don't intend to take action on the reported issue label Aug 5, 2022
@a-siva a-siva closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-not-planned Closed as we don't intend to take action on the reported issue library-mirrors P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants