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

Issue 2039833002: New tests for initializing formal access. (Closed)

Created:
4 years, 6 months ago by eernst
Modified:
4 years, 6 months ago
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

New tests for initializing formal access. This CL adds tests for previously uncovered elements of the semantics and includes fixes such that the desired behavior is obtained. In particular, an `isInitializingFormal` element may now occur in contexts where it wasn't expected until now, and changes were made to handle it. It is also checked that a capture of an initializing formal (in a function literal) captures the parameter, not the field. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/543a51ff3eb1488e2c1938bfcd8779f0d634900c

Patch Set 1 #

Patch Set 2 : White space fix #

Total comments: 4

Patch Set 3 : Review response, just changing expected exception type #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -53 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/typechecker.dart View 4 chunks +17 lines, -4 lines 0 comments Download
M pkg/dart_messages/lib/shared_messages.dart View 1 chunk +2 lines, -0 lines 0 comments Download
A + tests/language/initializing_formal_capture_test.dart View 1 chunk +9 lines, -8 lines 0 comments Download
A + tests/language/initializing_formal_final_test.dart View 1 2 1 chunk +8 lines, -16 lines 0 comments Download
A + tests/language/initializing_formal_promotion_test.dart View 1 chunk +16 lines, -14 lines 0 comments Download
A + tests/language/initializing_formal_type_test.dart View 1 chunk +9 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
eernst
Missing test cases + impl for `this.x` access. Note that I haven't added any tests ...
4 years, 6 months ago (2016-06-06 08:22:42 UTC) #2
Johnni Winther
lgtm https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_promotion_test.dart File tests/language/initializing_formal_promotion_test.dart (right): https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_promotion_test.dart#newcode17 tests/language/initializing_formal_promotion_test.dart:17: if (x is A) y = x; Maybe ...
4 years, 6 months ago (2016-06-06 09:23:08 UTC) #3
floitsch
DBC. https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_final_test.dart File tests/language/initializing_formal_final_test.dart (right): https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_final_test.dart#newcode19 tests/language/initializing_formal_final_test.dart:19: Expect.throws(() => a.y(), (e) => e is Error); ...
4 years, 6 months ago (2016-06-06 10:33:24 UTC) #5
eernst
Review response. Catching up with Johnni about the multi/options conflict. https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_final_test.dart File tests/language/initializing_formal_final_test.dart (right): https://codereview.chromium.org/2039833002/diff/20001/tests/language/initializing_formal_final_test.dart#newcode19 ...
4 years, 6 months ago (2016-06-06 11:01:44 UTC) #6
eernst
Review response. Catching up with Johnni about the multi/options conflict.
4 years, 6 months ago (2016-06-06 11:01:47 UTC) #7
eernst
4 years, 6 months ago (2016-06-06 13:55:54 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
543a51ff3eb1488e2c1938bfcd8779f0d634900c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698