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

Issue 177543002: Constrain type annotations with deferred types. (Closed)

Created:
6 years, 10 months ago by sigurdm
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Constrain type annotations with deferred types. This implements the constraint that a type imported with a deferred import cannot be used in type annotations in the importing module. They can still be used in new-expressions. A violation will trigger a warning, and replace the type with a MalformedType. Was reverted by: Issue 185053005 r33277 R=floitsch@google.com, johnniwinther@google.com Committed: https://code.google.com/p/dart/source/detail?r=33273 Committed: https://code.google.com/p/dart/source/detail?r=33417

Patch Set 1 : #

Patch Set 2 : #

Total comments: 24

Patch Set 3 : #

Total comments: 18

Patch Set 4 : #

Patch Set 5 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -45 lines) Patch
M sdk/lib/_internal/compiler/implementation/deferred_load.dart View 1 2 3 4 7 chunks +34 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/elements.dart View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/modelx.dart View 2 chunks +6 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js/builder.dart View 1 2 3 4 1 chunk +30 lines, -0 lines 1 comment Download
M sdk/lib/_internal/compiler/implementation/js/js.dart View 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/checked_mode_helpers.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 6 chunks +55 lines, -22 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/resolution.dart View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/warnings.dart View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/deferred_emit_type_checks_test.dart View 1 chunk +4 lines, -2 lines 0 comments Download
M tests/language/deferred_constraints_lib.dart View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M tests/language/deferred_constraints_lib2.dart View 1 chunk +1 line, -1 line 0 comments Download
A tests/language/deferred_constraints_test.dart View 1 2 3 4 1 chunk +50 lines, -0 lines 1 comment Download
M tests/language/deferred_duplicate_prefix1_test.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/deferred_duplicate_prefix2_test.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/deferred_duplicate_prefix3_test.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/deferred_no_prefix_test.dart View 1 chunk +6 lines, -1 line 0 comments Download
A + tests/language/deferred_prefix_constraints_lib.dart View 1 1 chunk +1 line, -1 line 0 comments Download
A + tests/language/deferred_prefix_constraints_lib2.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 4 1 chunk +18 lines, -0 lines 2 comments Download
M tests/language/language_analyzer.status View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 1 chunk +3 lines, -0 lines 1 comment Download

Messages

Total messages: 15 (0 generated)
sigurdm
6 years, 10 months ago (2014-02-25 13:39:03 UTC) #1
sigurdm
Seems I was too quick posting for review - there are still some failing tests. ...
6 years, 10 months ago (2014-02-25 15:07:24 UTC) #2
sigurdm
It should be better now.
6 years, 9 months ago (2014-02-27 15:35:51 UTC) #3
floitsch
LGTM with a few comments. Wait for Johnni's OK. Missing test: lib.Class.static (at least I ...
6 years, 9 months ago (2014-02-28 12:58:15 UTC) #4
sigurdm
https://codereview.chromium.org/177543002/diff/170001/sdk/lib/_internal/compiler/implementation/deferred_load.dart File sdk/lib/_internal/compiler/implementation/deferred_load.dart (right): https://codereview.chromium.org/177543002/diff/170001/sdk/lib/_internal/compiler/implementation/deferred_load.dart#newcode199 sdk/lib/_internal/compiler/implementation/deferred_load.dart:199: void _computeImportDeferred(Import import, LibraryElement library) { On 2014/02/28 12:58:15, ...
6 years, 9 months ago (2014-03-03 13:18:49 UTC) #5
Johnni Winther
TypeResolver LGTM.
6 years, 9 months ago (2014-03-03 13:24:31 UTC) #6
floitsch
LGTM. https://codereview.chromium.org/177543002/diff/170001/sdk/lib/_internal/compiler/implementation/deferred_load.dart File sdk/lib/_internal/compiler/implementation/deferred_load.dart (right): https://codereview.chromium.org/177543002/diff/170001/sdk/lib/_internal/compiler/implementation/deferred_load.dart#newcode208 sdk/lib/_internal/compiler/implementation/deferred_load.dart:208: Element maybePrefix = library.find(import.prefix.toString()); On 2014/03/03 13:18:49, sigurdm ...
6 years, 9 months ago (2014-03-03 14:18:05 UTC) #7
sigurdm
6 years, 9 months ago (2014-03-04 12:50:44 UTC) #8
sigurdm
Committed patchset #4 manually as r33273 (presubmit successful).
6 years, 9 months ago (2014-03-04 14:12:36 UTC) #9
sigurdm
6 years, 9 months ago (2014-03-05 15:27:37 UTC) #10
floitsch
What did you change since the last time you committed?
6 years, 9 months ago (2014-03-05 16:16:29 UTC) #11
floitsch
On 2014/03/05 16:16:29, floitsch wrote: > What did you change since the last time you ...
6 years, 9 months ago (2014-03-05 16:16:50 UTC) #12
sigurdm
Several things changed. The "runtime error" negative tests did not work well in browsers. So ...
6 years, 9 months ago (2014-03-06 07:47:45 UTC) #13
floitsch
Still LGTM. https://codereview.chromium.org/177543002/diff/230001/sdk/lib/_internal/compiler/implementation/js/builder.dart File sdk/lib/_internal/compiler/implementation/js/builder.dart (right): https://codereview.chromium.org/177543002/diff/230001/sdk/lib/_internal/compiler/implementation/js/builder.dart#newcode68 sdk/lib/_internal/compiler/implementation/js/builder.dart:68: assert(result.value.codeUnitAt(0) == '"'.codeUnitAt(0)); since this is an ...
6 years, 9 months ago (2014-03-06 15:25:02 UTC) #14
sigurdm
6 years, 9 months ago (2014-03-07 10:04:57 UTC) #15
Message was sent while issue was closed.
Committed patchset #5 manually as r33417 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698