|
Don't report redundant type errors in strong mode.
Currently, "sideways casts" -- type errors where one type is assigned
to an unrelated type -- are reported by both ErrorVerifier and strong
mode's Checker. This leads to duplicate errors that the user can see.
ErrorVerifier's errors are generally better: they give the user more
contextual information and are easier to read. So this CL eliminates
Checker's reporting of these errors and only uses ErrorVerifier's.
However, in strong mode, type errors like this are fatal: DDC can't
generate correct code. So this also automatically upgrades all static
type warnings to errors when strong mode is enabled.
R=brianwilkerson@google.com, leafp@google.com
Committed: https://github.com/dart-lang/sdk/commit/2ef00b0c3d0182b5e4ea5ca55fd00b9d038ae40d
Total comments: 24
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+718 lines, -593 lines) |
Patch |
 |
M |
pkg/analyzer/lib/source/error_processor.dart
|
View
|
|
1 chunk |
+29 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/error_verifier.dart
|
View
|
|
5 chunks |
+50 lines, -60 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/generated/type_system.dart
|
View
|
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/task/strong/checker.dart
|
View
|
|
8 chunks |
+23 lines, -28 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/lib/src/task/strong/info.dart
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/source/error_processor_test.dart
|
View
|
1
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/context/mock_sdk.dart
|
View
|
|
1 chunk |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/task/dart_test.dart
|
View
|
1
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/task/strong/checker_test.dart
|
View
|
1
2
|
86 chunks |
+330 lines, -297 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/task/strong/inferred_type_test.dart
|
View
|
1
|
62 chunks |
+238 lines, -188 lines |
0 comments
|
Download
|
 |
M |
pkg/analyzer/test/src/task/strong/strong_test_helper.dart
|
View
|
|
1 chunk |
+10 lines, -4 lines |
0 comments
|
Download
|
Total messages: 12 (2 generated)
|