Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Issue 2981183003: fix #29766, fix #29782 - fix override checker's interface checking (Closed)

Created:
3 years, 5 months ago by Jennifer Messerly
Modified:
3 years, 5 months ago
CC:
dev-compiler+reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fix #29766, fix #29782 - fix override checker's interface checking R=vsm@google.com Committed: https://github.com/dart-lang/sdk/commit/fb613c0635ffea8b9cfaf22c391971c9ab16c9e0

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix #

Total comments: 8

Patch Set 3 : fix #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -225 lines) Patch
M DEPS View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/task/strong/checker.dart View 1 2 6 chunks +198 lines, -217 lines 1 comment Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 2 2 chunks +67 lines, -7 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Jennifer Messerly
https://codereview.chromium.org/2981183003/diff/1/pkg/dev_compiler/tool/build_pkgs.dart File pkg/dev_compiler/tool/build_pkgs.dart (right): https://codereview.chromium.org/2981183003/diff/1/pkg/dev_compiler/tool/build_pkgs.dart#newcode46 pkg/dev_compiler/tool/build_pkgs.dart:46: compileModule('collection', unsafeForceCompile: true); there's a soundness bug in package:collections: ...
3 years, 5 months ago (2017-07-19 03:45:21 UTC) #2
vsm
lgtm with comments does this logic need to be synced up somewhere in the new ...
3 years, 5 months ago (2017-07-19 17:19:04 UTC) #3
Paul Berry
On 2017/07/19 17:19:04, vsm wrote: > lgtm with comments > > does this logic need ...
3 years, 5 months ago (2017-07-19 17:26:47 UTC) #4
Jennifer Messerly
On 2017/07/19 17:26:47, Paul Berry wrote: > On 2017/07/19 17:19:04, vsm wrote: > > lgtm ...
3 years, 5 months ago (2017-07-19 19:09:22 UTC) #5
Jennifer Messerly
On 2017/07/19 19:09:22, Jennifer Messerly wrote: > On 2017/07/19 17:26:47, Paul Berry wrote: > > ...
3 years, 5 months ago (2017-07-20 04:48:20 UTC) #6
Jennifer Messerly
thanks Vijay! addressed those if you want to take another look https://codereview.chromium.org/2981183003/diff/20001/pkg/analyzer/lib/src/task/strong/checker.dart File pkg/analyzer/lib/src/task/strong/checker.dart (right): ...
3 years, 5 months ago (2017-07-20 19:15:50 UTC) #7
vsm
lgtm
3 years, 5 months ago (2017-07-20 23:07:15 UTC) #8
Jennifer Messerly
Committed patchset #3 (id:40001) manually as fb613c0635ffea8b9cfaf22c391971c9ab16c9e0 (presubmit successful).
3 years, 5 months ago (2017-07-21 23:02:58 UTC) #10
Siggi Cherem (dart-lang)
3 years, 5 months ago (2017-07-24 18:45:06 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2981183003/diff/40001/pkg/analyzer/lib/src/ta...
File pkg/analyzer/lib/src/task/strong/checker.dart (right):

https://codereview.chromium.org/2981183003/diff/40001/pkg/analyzer/lib/src/ta...
pkg/analyzer/lib/src/task/strong/checker.dart:1700: for (int i = 0; i <
type.mixins.length; i++) {
After this CL landed, we noticed about 30 strong mode errors in dart2js related
to this, but I believe we are getting false negatives. Most of them happen to be
about a mixin member overriden by another mixin further down.

I don't have the full context of the CL, but do I understand correctly that the
intent was to not report an error in that case either?

Here is a repro of the problem:

  abstract class I1 { num get x; }  
  abstract class I2 extends I1 { int get x; }

  class M1 { num get x => 0; }
  class M2 { int get x => 0; }

  class Base extends Object with M1 implements I1 {}
  class Child extends Base with M2 implements I2 {}

This produces the error:
  Base class introduces an invalid override.
  The type of 'M1.x' ('() → num') isn't a subtype of 'I2.x' ('() → int')

Note however that in Child M1.x is overriden by M2.x. If I were to inline M2
directly in the child class, for example, if I do:

  class Child2a extends Base { int get x => 0; }
  class Child2b extends Child2a implements I2 {}

Then I get no error.

Powered by Google App Engine
This is Rietveld 408576698