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

Issue 1167413005: In constant evaluation, consistently handle const depending on non-const. (Closed)

Created:
5 years, 6 months ago by Paul Berry
Modified:
5 years, 6 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

In constant evaluation, consistently handle const depending on non-const. It is a compile-time error for a constant value to depend on a non-constant value (or a non-constant constructor), however the analyzer still needs to be able to handle it. This CL adjusts the ConstantEvaluationEngine so that it consistently reports all the dependencies of a given constant (whether those dependencies are constant are not), but which is tolerant of being asked to compute a constant value of a non-constant. Fixes test failures with the new task model enabled. No behavioral change with the new task model disabled. R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/4e36247eeaec763406ca2b6a97986be47842b130

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -79 lines) Patch
M pkg/analyzer/lib/src/generated/constant.dart View 8 chunks +99 lines, -77 lines 0 comments Download
M pkg/analyzer/test/generated/all_the_rest_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Paul Berry
Brian-- This fixes the 4 errors in compile_time_error_code_test.dart with the new task model turned on. ...
5 years, 6 months ago (2015-06-09 20:32:34 UTC) #2
Brian Wilkerson
LGTM
5 years, 6 months ago (2015-06-09 20:38:36 UTC) #3
Paul Berry
5 years, 6 months ago (2015-06-09 20:48:49 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
4e36247eeaec763406ca2b6a97986be47842b130 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698