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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_types.dart

Issue 377413007: Fix crash for type variables with dynamic bound. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix copyright Created 6 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 | « no previous file | tests/language/regress_19728_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart_types.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_types.dart b/sdk/lib/_internal/compiler/implementation/dart_types.dart
index 93f385415f6815580d32ff3f546c6e9bb254a600..1df21c69c9d0bca2f2d4bc2d5b1b389382bfb2d1 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_types.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_types.dart
@@ -14,6 +14,7 @@ import 'elements/modelx.dart'
TypeDeclarationElementX,
TypedefElementX;
import 'elements/elements.dart';
+import 'helpers/helpers.dart';
floitsch 2014/07/10 13:17:27 unused.
Johnni Winther 2014/07/10 13:19:33 But nice to have!
import 'ordered_typeset.dart' show OrderedTypeSet;
import 'util/util.dart' show CURRENT_ELEMENT_SPANNABLE, equalElements;
@@ -1068,12 +1069,12 @@ abstract class AbstractTypeRelation extends DartTypeVisitor<bool, DartType> {
bool visitTypeVariableType(TypeVariableType t, DartType s) {
// Identity check is handled in [isSubtype].
DartType bound = t.element.bound;
- if (bound.element.isTypeVariable) {
+ if (bound.isTypeVariable) {
// The bound is potentially cyclic so we need to be extra careful.
Set<TypeVariableElement> seenTypeVariables =
new Set<TypeVariableElement>();
seenTypeVariables.add(t.element);
- while (bound.element.isTypeVariable) {
+ while (bound.isTypeVariable) {
TypeVariableElement element = bound.element;
if (identical(bound.element, s.element)) {
// [t] extends [s].
« no previous file with comments | « no previous file | tests/language/regress_19728_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698