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

Issue 2641543003: Use "Object" as the reified type of covariant override parameters. (Closed)

Created:
3 years, 11 months ago by Bob Nystrom
Modified:
3 years, 11 months ago
Reviewers:
Leaf, Brian Wilkerson
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use "Object" as the reified type of covariant override parameters. This ensures the runtime type is of the tear-off expression's static type, even when accessed through a superclass. I also moved the two tests into a subdirectory so they are easier to find. (It is inscrutable to me why we would have a single directory with 1,868 test files in it.) That involved enabling recursive directory listing in codegen_test, which exposed a couple of things. Fix #27484. R=leafp@google.com Committed: https://github.com/dart-lang/sdk/commit/590a1880663cfa92494000edba4fba8e2e6cb08e

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move getReifiedType() to MethodElement. #

Total comments: 6

Patch Set 3 : Clean up the mess I left in the previous commit. #

Total comments: 2

Patch Set 4 : Format. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -56 lines) Patch
M pkg/analyzer/lib/dart/element/element.dart View 1 1 chunk +9 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 1 1 chunk +27 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/handle.dart View 1 2 chunks +5 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/dart/element/member.dart View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 3 5 chunks +28 lines, -12 lines 0 comments Download
M pkg/dev_compiler/test/browser/language_tests.js View 2 chunks +3 lines, -1 line 0 comments Download
M pkg/dev_compiler/test/codegen_test.dart View 3 chunks +10 lines, -5 lines 0 comments Download
M pkg/dev_compiler/test/not_yet_strong_tests.dart View 2 chunks +5 lines, -1 line 0 comments Download
D tests/language_strong/checked_covariant_overrides_test.dart View 1 chunk +0 lines, -36 lines 0 comments Download
A + tests/language_strong/covariant_override/runtime_check_test.dart View 0 chunks +-1 lines, --1 lines 0 comments Download
A tests/language_strong/covariant_override/tear_off_type_test.dart View 1 2 3 1 chunk +158 lines, -0 lines 0 comments Download
M tests/language_strong/language_strong_kernel.status View 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (2 generated)
Bob Nystrom
I'm not crazy about the name "getReifiedType()", so let me know if you have any ...
3 years, 11 months ago (2017-01-17 21:22:37 UTC) #2
Leaf
https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart File pkg/analyzer/lib/dart/element/type.dart (right): https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart#newcode259 pkg/analyzer/lib/dart/element/type.dart:259: FunctionType getReifiedType(DartType objectType); Should this really be on the ...
3 years, 11 months ago (2017-01-17 21:59:23 UTC) #3
Brian Wilkerson
https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart File pkg/analyzer/lib/dart/element/type.dart (right): https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart#newcode259 pkg/analyzer/lib/dart/element/type.dart:259: FunctionType getReifiedType(DartType objectType); I agree that MethodElement would be ...
3 years, 11 months ago (2017-01-17 22:15:32 UTC) #4
Bob Nystrom
On 2017/01/17 22:15:32, Brian Wilkerson wrote: > https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart > File pkg/analyzer/lib/dart/element/type.dart (right): > > https://codereview.chromium.org/2641543003/diff/1/pkg/analyzer/lib/dart/element/type.dart#newcode259 ...
3 years, 11 months ago (2017-01-18 00:46:03 UTC) #5
Leaf
> > I agree that MethodElement would be better, but I have to ask: is ...
3 years, 11 months ago (2017-01-18 01:23:37 UTC) #6
Bob Nystrom
On 2017/01/18 01:23:37, Leaf wrote: > > > I agree that MethodElement would be better, ...
3 years, 11 months ago (2017-01-18 01:30:40 UTC) #7
Leaf
https://codereview.chromium.org/2641543003/diff/20001/pkg/analyzer/lib/src/dart/element/member.dart File pkg/analyzer/lib/src/dart/element/member.dart (right): https://codereview.chromium.org/2641543003/diff/20001/pkg/analyzer/lib/src/dart/element/member.dart#newcode606 pkg/analyzer/lib/src/dart/element/member.dart:606: FunctionType getReifiedType(DartType objectType) => baseElement.getReifiedType(objectType); long line? https://codereview.chromium.org/2641543003/diff/20001/pkg/dev_compiler/lib/js/amd/dart_sdk.js File ...
3 years, 11 months ago (2017-01-18 01:51:45 UTC) #8
Bob Nystrom
OK, should be better now. Sorry about that. That's what I get for trying to ...
3 years, 11 months ago (2017-01-18 21:42:52 UTC) #9
Leaf
lgtm https://codereview.chromium.org/2641543003/diff/40001/tests/language_strong/covariant_override/tear_off_type_test.dart File tests/language_strong/covariant_override/tear_off_type_test.dart (right): https://codereview.chromium.org/2641543003/diff/40001/tests/language_strong/covariant_override/tear_off_type_test.dart#newcode97 tests/language_strong/covariant_override/tear_off_type_test.dart:97: class Mixed extends Superclass with Mixin1, Mixin2 implements ...
3 years, 11 months ago (2017-01-18 22:23:04 UTC) #10
Bob Nystrom
https://codereview.chromium.org/2641543003/diff/40001/tests/language_strong/covariant_override/tear_off_type_test.dart File tests/language_strong/covariant_override/tear_off_type_test.dart (right): https://codereview.chromium.org/2641543003/diff/40001/tests/language_strong/covariant_override/tear_off_type_test.dart#newcode97 tests/language_strong/covariant_override/tear_off_type_test.dart:97: class Mixed extends Superclass with Mixin1, Mixin2 implements Interface1, ...
3 years, 11 months ago (2017-01-18 22:37:29 UTC) #11
Bob Nystrom
3 years, 11 months ago (2017-01-18 22:48:48 UTC) #13
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
590a1880663cfa92494000edba4fba8e2e6cb08e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698