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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 2166133002: fix #26912, correct handling of op assign (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 739b24d0760175f9f8ec18c3fd8f0218992ee423..343a2aea64f2d536eccfd8990508c8cf5fb9ef5e 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -264,7 +264,7 @@ foo() => new A();
test() {
int x = 0;
x += 5;
- /*error:STATIC_TYPE_ERROR*/x += 3.14;
+ /*error:STATIC_TYPE_ERROR*/x += /*error:INVALID_ASSIGNMENT*/3.14;
double y = 0.0;
y += 5;
@@ -1927,6 +1927,18 @@ main() {
check(implicitCasts: false);
}
+ void test_implicitCasts_numericOps() {
+ // Regression test for https://github.com/dart-lang/sdk/issues/26912
+ addFile(r'''
+void f() {
+ int x = 0;
+ int y = 0;
+ x += y;
+}
+ ''');
+ check(implicitCasts: false);
+ }
+
void test_implicitDynamic_field() {
addFile(r'''
class C {
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698