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

feature CtTypeMember extends CtNamedElement #1452

Merged
merged 1 commit into from
Jun 30, 2017

Conversation

pvojtechovsky
Copy link
Collaborator

WDYT?

@surli
Copy link
Collaborator

surli commented Jun 29, 2017

It's specified in the javadoc :

nested class or static/instance initializer).

Am I wrong, or a static initializer is an anonymous block?

@pvojtechovsky
Copy link
Collaborator Author

You are right, but CtAnonymousExecutable already implements CtNamedElement and returns "" for the name. So this change is breaking nothing and helps clients (me ;-) ) to query type members by name without casting...

@surli
Copy link
Collaborator

surli commented Jun 29, 2017

Hmm, actually I wonder why CtExecutable implements CtNamedElement as many executables are not named (lambda, anonymous executables, ...). @monperrus ?

@pvojtechovsky
Copy link
Collaborator Author

I vote to keep it as it is - it is may be not 100% correct from java model point of view, but I think it is good for clients.

@monperrus
Copy link
Collaborator

OK for me.

@surli surli merged commit 7a01b5e into INRIA:master Jun 30, 2017
@pvojtechovsky pvojtechovsky deleted the feaTypeMemberExtendsNamed branch July 2, 2017 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants