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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2252183002: Fix calling object methods and properties on function types (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix calling object methods and properties on function types Created 4 years, 4 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: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index f76bdc2b585d6f4d9de1d050a04e57368248c5ac..d885ed94b6137b3a77fd9a70e624f4b52458dfa5 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1058,6 +1058,7 @@ abstract class CompilationUnitElementForLink
return null;
}
}
+
ReferenceableElementForLink element = resolveRef(type.reference);
return element.buildType(
getTypeArgument, type.implicitFunctionTypeIndices);
@@ -1364,6 +1365,7 @@ class ConstConstructorNode extends ConstNode {
dependencies.add(target);
}
}
+
UnlinkedExecutable unlinkedExecutable =
constructorElement._unlinkedExecutable;
ClassElementForLink_Class enclosingClass =
@@ -4175,8 +4177,10 @@ class PropertyAccessorElementForLink_Executable
bool get isStatic => enclosingClass == null || super.isStatic;
@override
- ElementKind get kind => _unlinkedExecutable.kind ==
- UnlinkedExecutableKind.getter ? ElementKind.GETTER : ElementKind.SETTER;
+ ElementKind get kind =>
+ _unlinkedExecutable.kind == UnlinkedExecutableKind.getter
+ ? ElementKind.GETTER
+ : ElementKind.SETTER;
@override
ReferenceableElementForLink getContainedName(String name) {
@@ -4656,7 +4660,9 @@ class TypeInferenceNode extends Node<TypeInferenceNode> {
String toString() => 'TypeInferenceNode($functionElement)';
}
-class TypeProviderForLink implements TypeProvider {
+class TypeProviderForLink extends Object
+ with TypeProviderBaseMixin
+ implements TypeProvider {
final Linker _linker;
InterfaceType _boolType;
@@ -4738,16 +4744,6 @@ class TypeProviderForLink implements TypeProvider {
_mapType ??= _buildInterfaceType(_linker.coreLibrary, 'Map');
@override
- List<InterfaceType> get nonSubtypableTypes => <InterfaceType>[
- nullType,
- numType,
- intType,
- doubleType,
- boolType,
- stringType
- ];
-
- @override
DartObjectImpl get nullObject {
// TODO(paulberry): implement if needed
throw new UnimplementedError();

Powered by Google App Engine
This is Rietveld 408576698