[go: nahoru, domu]

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

Static extension imported twice is not resolved. #39160

Closed
sigurdm opened this issue Oct 29, 2019 · 0 comments
Closed

Static extension imported twice is not resolved. #39160

sigurdm opened this issue Oct 29, 2019 · 0 comments
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone

Comments

@sigurdm
Copy link
Contributor
sigurdm commented Oct 29, 2019

Example:
lib/a.dart

class A {}

extension E on A {
  foo() {}
}

lib/b.dart

export 'a.dart' show E;

bin/main.dart

import 'package:a/a.dart';
import 'package:a/b.dart';

main() {
  A().foo();
}
$ dart bin/main.dart
bin/main.dart:5:7: Error: The method 'foo' isn't defined for the class 'A'.
 - 'A' is from 'package:a/a.dart' ('lib/a.dart').
Try correcting the name to the name of an existing method, or defining a method named 'foo'.
  A().foo();
$ dart2js bin/main.dart
bin/main.dart:5:7:
Error: The method 'foo' isn't defined for the class 'A'.
 - 'A' is from 'package:a/a.dart' ('lib/a.dart').
  A().foo();
      ^^^
Error: Compilation failed.
$ dartanalyzer bin/main.dart 
Analyzing bin/main.dart...
No issues found!

Seems to be an issue in the common front-end

@sigurdm sigurdm added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Oct 29, 2019
@sigurdm sigurdm added this to the D27 Release milestone Oct 29, 2019
@lrhn lrhn added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants