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

strong mode does not check ClassTypeAlias syntax form #29426

Closed
jmesserly opened this issue Apr 21, 2017 · 4 comments
Closed

strong mode does not check ClassTypeAlias syntax form #29426

jmesserly opened this issue Apr 21, 2017 · 4 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on soundness

Comments

@jmesserly
Copy link

jmesserly commented Apr 21, 2017

Strong mode does not check ClassTypeAlias syntax form.

This affects all of our checking. For example, consider this from our tests:

class A {}
class B {}

abstract class I {
    m(A a);
}

class M {
    m(B a) {}
}

class /*error:INCONSISTENT_METHOD_INHERITANCE*/T1
    extends Object with /*error:INVALID_METHOD_OVERRIDE_FROM_MIXIN*/M
    implements I {}

// BUG BUG BUG these should also have errors
class T2 = Object with M implements I;
class T3 extends T2 {}

T2/T3 produces no errors at all, unlike the (very similar) T1.

@jmesserly jmesserly added analyzer-strong-mode area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. soundness labels Apr 21, 2017
@bwilkerson bwilkerson added the P2 A bug or feature request we're likely to work on label Apr 24, 2017
@bwilkerson bwilkerson added the status-blocked Blocked from making progress by another (referenced) issue label Apr 24, 2017
@bwilkerson
Copy link
Member

Blocked on #29448.

@jmesserly
Copy link
Author

jmesserly commented Apr 24, 2017

@bwilkerson -- see above, this is not at all related to fields! I think maybe my description was confusing. I will remove the "originally reported at" line :)

EDIT: and I was confused at first by #27452 too :) ... until I looked into it, I didn't realize the bug was much more serious than just fields. Any time you declare a class with ClassTypeAlias syntax form, we don't check for override soundness (and a few more things). We were literally not visiting the AST node ... ooops :(. ErrorVerifier is a bit better because it was visiting the node, but I found a few checks that were missing there too.

@jmesserly jmesserly removed the status-blocked Blocked from making progress by another (referenced) issue label Apr 24, 2017
@jmesserly jmesserly self-assigned this Apr 24, 2017
@jmesserly
Copy link
Author

Also BTW: I have a CL in progress :)

@jmesserly
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on soundness
Projects
None yet
Development

No branches or pull requests

2 participants