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

Unified Diff: lib/src/checker/rules.dart

Issue 1160223006: Fix DDC errors on DDC (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: address comments Created 5 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 | « lib/src/checker/resolver.dart ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/rules.dart
diff --git a/lib/src/checker/rules.dart b/lib/src/checker/rules.dart
index f77f77ef4802c6b58956ba16969b48a0ba052551..8e5717af4d36681e3e30e62c5b8277b383b6864c 100644
--- a/lib/src/checker/rules.dart
+++ b/lib/src/checker/rules.dart
@@ -748,7 +748,9 @@ class DownwardsInference {
// the instantiated type of the constructor, then
// the uninstantiated element for the constructor, then
// the uninstantiated type for the constructor
- var baseType = constructorElement.type.element.type;
+ var rawConstructorElement =
+ constructorElement.type.element as ConstructorElement;
+ var baseType = rawConstructorElement.type;
if (baseType == null) return false;
// From the interface type (instantiated), get:
// the uninstantiated element, then
@@ -791,8 +793,8 @@ class DownwardsInference {
bool _inferFunctionExpression(FunctionExpression e, DartType t, errors) {
if (t is! FunctionType) return false;
- var fType = (t as FunctionType);
- var eType = e.staticType;
+ var fType = t as FunctionType;
+ var eType = e.staticType as FunctionType;
if (eType is! FunctionType) return false;
// We have a function literal, so we can treat the arrow type
« no previous file with comments | « lib/src/checker/resolver.dart ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698