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

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

Issue 1956443003: Update mock SDK 'double'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/test/src/task/strong/checker_test.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/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index cf5f6578da53146eb5fc17f6020f28f7d409015f..1fdfc1e93c29bef864cfa1b664962428ca02ada8 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -382,7 +382,7 @@ main() {
}
''');
var f = mainUnit.functions[0].localVariables[0];
- expect(f.type.toString(), '() → (int) → num');
+ expect(f.type.toString(), '() → (int) → double');
}
void test_blockBodiedLambdas_nestedLambdas_topLevel() {
@@ -393,7 +393,7 @@ var f = /*info:INFERRED_TYPE_CLOSURE*/() {
};
''');
var f = mainUnit.topLevelVariables[0];
- expect(f.type.toString(), '() → (int) → num');
+ expect(f.type.toString(), '() → (int) → double');
}
void test_blockBodiedLambdas_noReturn() {
@@ -2104,29 +2104,6 @@ var y = new C().m(1, b: 'bbb', c: 2.0);
expect(unit.topLevelVariables[0].type.toString(), 'double');
}
- void test_refineBinaryExpressionType_typeParameter() {
- checkFile('''
-class Point<T extends num> {
- T x;
- T y;
-
- Point(this.x, this.y);
-
- Point<T> operator +(Point<T> other) {
- return new Point<T>(x + other.x, y + other.y);
- }
-
- Point<T> operator -(Point<T> other) {
- return new Point<T>(x - other.x, y - other.y);
- }
-
- Point<T> operator *(Point<T> other) {
- return new Point<T>(x * other.x, y * other.y);
- }
-}
- ''');
- }
-
void test_inferGenericMethodType_positional() {
var unit = checkFile('''
class C {
@@ -3043,6 +3020,29 @@ final x = F;
expect(x.type.toString(), 'Type');
}
+ void test_refineBinaryExpressionType_typeParameter() {
+ checkFile('''
+class Point<T extends num> {
+ T x;
+ T y;
+
+ Point(this.x, this.y);
+
+ Point<T> operator +(Point<T> other) {
+ return new Point<T>(x + other.x, y + other.y);
+ }
+
+ Point<T> operator -(Point<T> other) {
+ return new Point<T>(x - other.x, y - other.y);
+ }
+
+ Point<T> operator *(Point<T> other) {
+ return new Point<T>(x * other.x, y * other.y);
+ }
+}
+ ''');
+ }
+
void test_staticRefersToNonStaticField_inOtherLibraryCycle() {
addFile(
'''
« no previous file with comments | « pkg/analyzer/test/src/task/strong/checker_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698