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

Issue 1124433007: Fix constant evaluation logic for String.length. (Closed)

Created:
5 years, 7 months ago by Paul Berry
Modified:
5 years, 7 months ago
Reviewers:
scheglov
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Fix constant evaluation logic for String.length. Previously, we used static resolution to determine whether String.length was being referred to, causing incorrect results in the presence of bad type annotations. Also, we were missing a null check, causing constant evaluation to crash if an attempt was made to take the length of a constant that couldn't be evaluated. BUG=dartbug.com/23383 R=scheglov@google.com Committed: https://code.google.com/p/dart/source/detail?r=45524

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -24 lines) Patch
M pkg/analyzer/lib/src/generated/constant.dart View 4 chunks +23 lines, -24 lines 0 comments Download
M pkg/analyzer/test/generated/all_the_rest_test.dart View 1 chunk +28 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/compile_time_error_code_test.dart View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Paul Berry
5 years, 7 months ago (2015-05-05 03:51:24 UTC) #2
scheglov
LGTM
5 years, 7 months ago (2015-05-05 06:24:06 UTC) #3
Paul Berry
5 years, 7 months ago (2015-05-05 13:07:32 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 45524 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698