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

Unified Diff: tests/compiler/dart2js/type_mask2_test.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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
Index: tests/compiler/dart2js/type_mask2_test.dart
diff --git a/tests/compiler/dart2js/type_mask2_test.dart b/tests/compiler/dart2js/type_mask2_test.dart
index 4a28dce4cf2c5e0f7cab8bbd4808998975affc00..6aac3a1c3c66a048d65d7a7992b7c9fc544387d0 100644
--- a/tests/compiler/dart2js/type_mask2_test.dart
+++ b/tests/compiler/dart2js/type_mask2_test.dart
@@ -8,13 +8,14 @@ import 'dart:async';
import 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'type_test_helper.dart';
-import 'package:compiler/src/elements/elements.dart' show Element, ClassElement;
+import 'package:compiler/src/elements/elements.dart' show ClassElement;
import 'package:compiler/src/types/types.dart';
import 'package:compiler/src/world.dart' show ClosedWorld;
isCheckedMode() {
try {
- var i = 1;
+ dynamic i = 1;
+ // ignore: UNUSED_LOCAL_VARIABLE
String s = i;
return false;
} catch (e) {
@@ -57,7 +58,7 @@ checkMasks(ClosedWorld closedWorld, List<ClassElement> allClasses,
'Unexpected flattening of $disjoint: '
'$flattenResult, expected $flattened.');
}
- var union = UnionTypeMask.unionOf(masks, closedWorld);
+ dynamic union = UnionTypeMask.unionOf(masks, closedWorld);
if (result == null) {
Expect.isTrue(union is UnionTypeMask,
'Expected union of $masks to be a union-type: $union.');
@@ -219,8 +220,6 @@ Future testStringSubtypes() async {
ClassElement String_ = env.getElement("String");
ClassElement JSString = closedWorld.commonElements.jsStringClass;
- List<ClassElement> allClasses = <ClassElement>[Object_, String_];
-
Expect.isFalse(closedWorld.isDirectlyInstantiated(Object_));
Expect.isTrue(closedWorld.isIndirectlyInstantiated(Object_));
Expect.isTrue(closedWorld.isInstantiated(Object_));
« no previous file with comments | « tests/compiler/dart2js/type_inference8_test.dart ('k') | tests/compiler/dart2js/type_mask_disjoint_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698