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

Errors when importing getter and setter from different libraries #25625

Closed
stereotype441 opened this issue Jan 31, 2016 · 4 comments
Closed

Errors when importing getter and setter from different libraries #25625

stereotype441 opened this issue Jan 31, 2016 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@stereotype441
Copy link
Member

Attempting to import a getter named x and setter named x= from different libraries produces inconsistent results in the VM. If the getter is imported first, and there is no import prefix, there is no problem. Otherwise, an attempt to use the getter results in the following runtime error: No top-level getter 'x' declared. (or, if the import prefix is p: No top-level getter 'p.x' declared.)

These errors are incorrect. There's nothing in the spec requiring a getter and its corresponding setter to be imported from the same library; the two entities have different names so they should not conflict with each other.

Dart2js and the analyzer also mishandle this situation, but not in the same way.

I will submit shared tests shortly demonstrating the bug.

@stereotype441 stereotype441 added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Jan 31, 2016
stereotype441 added a commit that referenced this issue Feb 1, 2016
@mhausner
Copy link
Contributor

Have the tests been checked in?

@stereotype441
Copy link
Member Author

@mhausner yes, they were added in 4896fea.

@mhausner
Copy link
Contributor

mhausner commented Mar 2, 2016

Proposed fix: https://codereview.chromium.org/1752203002/

@mhausner
Copy link
Contributor

mhausner commented Mar 2, 2016

Committed patchset #2 (id:20001) manually as
5a0a097 (presubmit successful).

https://codereview.chromium.org/1752203002/

@mhausner mhausner closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

2 participants