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

Ambiguous imported type names should not be compile-time errors #6659

Closed
DartBot opened this issue Nov 12, 2012 · 7 comments
Closed

Ambiguous imported type names should not be compile-time errors #6659

DartBot opened this issue Nov 12, 2012 · 7 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Nov 12, 2012

This issue was originally filed by alexe.kaigorodov@gmail.com


In "13.1 Imports", the specification (v.013) says:

If a name N is referenced by a library L and N is introduced into the top
level scope L by more than one import then:
• It is a static warning if N is used as a type annotation.
• In checked mode, it is a dynamic error if N is used as a type annotation
and referenced during a subtype test.
• Otherwise, it is a compile-time error.

However, even when the first condition is met, Dart VM still yields a compile error.

Affected co 19 test:
Language/13_Libraries_and_Scripts/1_Imports_A03_t28.dart

@madsager
Copy link
Contributor

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

cc @gbracha.
Set owner to @mhausner.
Added Accepted label.

@DartBot
Copy link
Author

DartBot commented Nov 16, 2012

This comment was originally written by rodion...@unipro.ru


the test was renamed to 1_Imports_A03_t31

@DartBot
Copy link
Author

DartBot commented Dec 27, 2012

This comment was originally written by @mhausner


Changed the title to: "Ambiguous imported type names should not be compile-time errors".

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@DartBot
Copy link
Author

DartBot commented Aug 7, 2013

This comment was originally written by @mhausner


Regis, could you please check whether this bug is still accurate? I think you may have fixed this already.

tests/co19/src/Language/13_Libraries_and_Scripts/1_Imports_A03_t31.dart

The test fails for an unrelated reason. It does not import the expect package. When I add the necessary import, I get:

$ dart --checked tests/co19/src/Language/13_Libraries_and_Scripts/1_Imports_A03_t31.dart
Unhandled exception:
Expect.fail('Type error expected in checking mode')
#­0 Expect._fail (package:expect/expect.dart:368:5)
#­1 Expect.fail (package:expect/expect.dart:154:10)
#­2 checkTypeError (file:///src/d2/dart/tests/co19/src/Utils/dynamic_check.dart:19:18)
#­3 checkTypeError (file:///src/d2/dart/tests/co19/src/Utils/dynamic_check.dart:20:7)
#­4 main (file:///src/d2/dart/tests/co19/src/Language/13_Libraries_and_Scripts/1_Imports_A03_t31.dart:32:17)


Set owner to @crelier.

@crelier
Copy link
Contributor

crelier commented Aug 7, 2013

Fixed in r25324.

There is a co19 issue filed against the test (issue #481).


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Aug 7, 2013
This issue was closed.
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, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants