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

Issue 2060013002: Refactor strong mode to use standard Analyzer errors (Closed)

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

Description

Refactor strong mode to use standard Analyzer errors Also changes implicit casts errors to be determined by the type system isAssignableTo code, and updates our tests to show the user-facing error levels (StaticTypeWarningCode is upgraded to errors as far as users can see, but this wasn't visible in the tests, which showed these as "warnings"). found while looking at #26583 R=brianwilkerson@google.com, leafp@google.com Committed: https://github.com/dart-lang/sdk/commit/831c875484fe5e6ce25b50b93b99b4076df63285 Reverted & then re-landed in: https://codereview.chromium.org/2062793003/

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : fix hasImplicitCasts on the CompilationUnit #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+666 lines, -822 lines) Patch
M pkg/analyzer/lib/src/generated/error.dart View 1 2 chunks +129 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/generated/error_verifier.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 5 chunks +17 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/generated/type_system.dart View 4 chunks +24 lines, -14 lines 2 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/task/options.dart View 2 chunks +0 lines, -3 lines 0 comments Download
A pkg/analyzer/lib/src/task/strong/ast_properties.dart View 1 chunk +49 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong/checker.dart View 1 2 3 18 chunks +170 lines, -61 lines 0 comments Download
D pkg/analyzer/lib/src/task/strong/info.dart View 1 chunk +0 lines, -468 lines 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 2 chunks +2 lines, -4 lines 2 comments Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 2 54 chunks +155 lines, -156 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/inferred_type_test.dart View 41 chunks +87 lines, -87 lines 2 comments Download
M pkg/analyzer/test/src/task/strong/strong_test_helper.dart View 12 chunks +24 lines, -14 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
Jennifer Messerly
https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/test/src/task/strong/checker_test.dart File pkg/analyzer/test/src/task/strong/checker_test.dart (right): https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/test/src/task/strong/checker_test.dart#newcode1905 pkg/analyzer/test/src/task/strong/checker_test.dart:1905: 'num n; int i = /*info:ASSIGNMENT_CAST,severe:INVALID_ASSIGNMENT*/n;'); Note the slight ...
4 years, 6 months ago (2016-06-10 22:28:41 UTC) #4
Jennifer Messerly
Aside: I would also like to fix "severe" to say "error" and "info" to say ...
4 years, 6 months ago (2016-06-10 22:29:33 UTC) #5
Jennifer Messerly
https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/lib/src/task/strong/ast_properties.dart File pkg/analyzer/lib/src/task/strong/ast_properties.dart (right): https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/lib/src/task/strong/ast_properties.dart#newcode20 pkg/analyzer/lib/src/task/strong/ast_properties.dart:20: bool hasImplicitCasts(CompilationUnit node) { testing out the DDC side, ...
4 years, 6 months ago (2016-06-10 22:59:24 UTC) #6
Jennifer Messerly
https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/lib/src/task/strong/ast_properties.dart File pkg/analyzer/lib/src/task/strong/ast_properties.dart (right): https://codereview.chromium.org/2060013002/diff/60001/pkg/analyzer/lib/src/task/strong/ast_properties.dart#newcode20 pkg/analyzer/lib/src/task/strong/ast_properties.dart:20: bool hasImplicitCasts(CompilationUnit node) { On 2016/06/10 22:59:24, John Messerly ...
4 years, 6 months ago (2016-06-10 23:13:12 UTC) #7
Brian Wilkerson
Nice! LGTM > Aside: I would also like to fix "severe" to say "error" and ...
4 years, 6 months ago (2016-06-11 00:08:33 UTC) #8
Leaf
lgtm! thanks for cleaning all this up! https://codereview.chromium.org/2060013002/diff/80001/pkg/analyzer/lib/src/generated/type_system.dart File pkg/analyzer/lib/src/generated/type_system.dart (right): https://codereview.chromium.org/2060013002/diff/80001/pkg/analyzer/lib/src/generated/type_system.dart#newcode308 pkg/analyzer/lib/src/generated/type_system.dart:308: } I ...
4 years, 6 months ago (2016-06-11 00:24:39 UTC) #9
Jennifer Messerly
Thanks guys. I will have a look at making the changes suggested + landing on ...
4 years, 6 months ago (2016-06-11 00:40:38 UTC) #10
Jennifer Messerly
4 years, 6 months ago (2016-06-13 16:54:25 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:80001) manually as
831c875484fe5e6ce25b50b93b99b4076df63285 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698