-
Notifications
You must be signed in to change notification settings - Fork 1.7k
NNBD: Both dart and analyzer allow inherit two interfaces with incompatible type parameters: Object?
vs dynamic
and Object?
vs void
.
#40453
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
Comments
Object?
vs dynamic
and Obhect?
vs void
.Object?
vs dynamic
and Object?
vs void
.
I believe that @eernstg Agree? |
OK, but anyway - |
|
OK, so seems like this bug should be closed as work-as-designed. |
@lrhn wrote:
Yes. The approach based on normalization and then nnbd top merging is actually considerably more flexible than the old rules: We had 'It is a compile-time error if a class So we do allow more. In particular, the following assumption is too strong: @iarkh wrote:
|
Uh oh!
There was an error while loading. Please reload this page.
Dart VM version: 2.8.0-edge.40f23c735f04433e4fc334fbd674474bd3de0f8b (Tue Jan 28 01:14:48 2020 +0000) on "linux_x64"
The following source code declares classes
X1
andX2
which inherit classes with incompatible type arguments:This code throws compile error with previous dart versions (for example, 2.7.0) and it seems like dart should do so, for example, see
Classes defined in opted-in libraries
in NNBD Spec:However, current both dart and analyzer do not throw error here, sample output is:
The text was updated successfully, but these errors were encountered: