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

When more than one unique symbol is found in a source locator, decide what to do #69

Open
Ocramius opened this issue Jul 19, 2015 · 0 comments

Comments

@Ocramius
Copy link
Member

Following code is perfectly valid in BetterReflection, but the outcome is rather unexpected:

class Foo {}
class Foo {}
function bar() {}
function bar() {}
const BAZ = 'baz';
const BAZ = 'baz';

Things that better reflection could do:

  • throw an exception if an API such as getClass($name) is used (expecting 1 result, found 2)
  • return all reflections if an API such as getClassesByName($name) is used (2 results)

This is yet to be decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants