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

Unified Diff: pkg/compiler/lib/src/dart_types.dart

Issue 1971763002: Revert "Adjusts dart2js SSA builder to tolerate method type arguments." (Closed) Base URL: https://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 | « no previous file | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index f106971a5f3143948db7f2236e9652d5a6861225..685077d0b6380f328b351f118f8e5157f45b29d2 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -234,16 +234,6 @@ class TypeVariableType extends DartType {
String toString() => name;
}
-/// Provides a thin model of method type variables: They are treated as if
-/// their value were `dynamic` when used in a type annotation, and as a
-/// malformed type when used in an `as` or `is` expression.
-class MethodTypeVariableType extends TypeVariableType {
- MethodTypeVariableType(TypeVariableElement element) : super(element);
-
- @override
- bool get treatAsDynamic => true;
-}
-
/// Internal type representing the result of analyzing a statement.
class StatementType extends DartType {
Element get element => null;
@@ -1357,9 +1347,6 @@ class Types implements DartTypes {
static ClassElement getClassContext(DartType type) {
TypeVariableType typeVariable = type.typeVariableOccurrence;
if (typeVariable == null) return null;
- // TODO(eernst): When generic method support is complete enough to include
- // a runtime value for method type variables, this may need to be updated.
- if (typeVariable.element.typeDeclaration is! ClassElement) return null;
return typeVariable.element.typeDeclaration;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698