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

Duplicate part directives cause problems #19474

Closed
stevemessick opened this issue Jun 16, 2014 · 6 comments
Closed

Duplicate part directives cause problems #19474

stevemessick opened this issue Jun 16, 2014 · 6 comments
Labels
area-language New language issues should be filed at https://github.com/dart-lang/language closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@stevemessick
Copy link
Contributor

[ed note: I believe this is in reference to a then-incomprehensible feedback about duplicate name errors. If I'm reading this correctly, having two identical part directives is causing strange errors]

To previous message... Resolved

I used one part 2 times in my app: part 'dawo_app.dart';

No error message... should it be?

sorry for the mess :)
////////////////////////////////////////////////////////////////////////////////////
Editor: 1.4.2.release (2014-05-27)
OS: Windows 7 - amd64 (6.1)
JVM: 1.7.0_45

projects: 14

open dart files: 3

auto-run pub: true
localhost resolves to: 127.0.0.1
mem max/total/free: 1778 / 878 / 187 MB
thread count: 34
index: 643409 relationships in 141157 keys in 1197 sources

SDK installed: true
Dartium installed: true

@bwilkerson
Copy link
Member

The problem is indeed caused by having two part directives for the same file. The specification does not currently disallow referring to the same part twice, but I'm guessing that that's an oversight.

For a simple example to reproduce the behavior, create the two files shown below in the Editor. We complain about 'C' being defined more than once, which is not helpful to the user. Should we change the spec?

---------- lib.dart ----------
library lib;

part 'part.dart';
part 'part.dart';

---------- part.dart ----------
part of lib;

class C {
}


Set owner to @gbracha.

@gbracha
Copy link
Contributor

gbracha commented Jun 30, 2014

I'll ask TC52.


Added Accepted label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@bwilkerson
Copy link
Member

Has there been any progress on this issue?


Removed Area-Analyzer label.
Added Area-Language label.

@gbracha
Copy link
Contributor

gbracha commented Nov 4, 2014

Not in this draft.

@stevemessick stevemessick added Type-Defect area-language New language issues should be filed at https://github.com/dart-lang/language labels Nov 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed accepted labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language New language issues should be filed at https://github.com/dart-lang/language closed-obsolete Closed as the reported issue is no longer relevant P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

6 participants