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

Unable to get resolved name for use clause name #164

Open
dantleech opened this issue Aug 6, 2017 · 2 comments
Open

Unable to get resolved name for use clause name #164

dantleech opened this issue Aug 6, 2017 · 2 comments

Comments

@dantleech
Copy link
Contributor

Getting the resolved name of a use clause using QualifiedName#getResolvedName is explicitly disallowed and I am not sure why, it seems legitimate to me?

namespace SomeNamespace;

use Something\HelloTrait;

class Foobar
{
    use HelloTrait;
}
$name->getResolvedName()

Expected: Something\HelloTrait
Actual: null.

@roblourens
Copy link
Member

I don't have a good answer... it seems like they should be resolved in a similar way to usages of the names. I'm not sure why that limitation is in place, but that API is used in a lot of places, so I'll have to think about it some more.

@mousetraps
Copy link
Contributor

mousetraps commented Aug 9, 2017

Good catch. Honestly, based on the blame / commit history - it looks like a hack that inadvertently got committed from when I was working on completions support. So removing it might break something with completions, but that something should probably be fixed in other ways 😉

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

No branches or pull requests

3 participants