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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 2319233002: Have setters use strict -> like methods (Closed)
Patch Set: fix tests Created 4 years, 3 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/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index a2d003eeb795cec098d82777dba8c9e59a8befb6..f47c95728b04309c6425d7732f3ab6d6b47dceb6 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -1404,17 +1404,16 @@ class _OverrideChecker {
}
FunctionType concreteSubType = subType;
FunctionType concreteBaseType = baseType;
- if (element is MethodElement) {
- if (concreteSubType.typeFormals.isNotEmpty) {
- if (concreteBaseType.typeFormals.isEmpty) {
- concreteSubType = rules.instantiateToBounds(concreteSubType);
- }
+ if (concreteSubType.typeFormals.isNotEmpty) {
+ if (concreteBaseType.typeFormals.isEmpty) {
+ concreteSubType = rules.instantiateToBounds(concreteSubType);
}
- concreteSubType =
- rules.typeToConcreteType(_typeProvider, concreteSubType);
- concreteBaseType =
- rules.typeToConcreteType(_typeProvider, concreteBaseType);
}
+ concreteSubType =
+ rules.typeToConcreteType(_typeProvider, concreteSubType);
+ concreteBaseType =
+ rules.typeToConcreteType(_typeProvider, concreteBaseType);
+
if (!rules.isSubtypeOf(concreteSubType, concreteBaseType)) {
// See whether non-subtype cases fit one of our common patterns:
//
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698