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

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

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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 | « pkg/compiler/analysis_options.yaml ('k') | pkg/compiler/lib/src/constants/constant_constructors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index c69a01510b29c4277aadc82cb45fd0e8f3636073..59c0f46dedd731ac10391b6d087eba99c903914b 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -41,7 +41,8 @@ abstract class ClosureDataLookup<T> {
/// used inside the scope of [node].
// TODO(johnniwinther): Split this up into two functions, one for members and
// one for local functions.
- ClosureRepresentationInfo getClosureRepresentationInfo(Entity member);
+ ClosureRepresentationInfo getClosureRepresentationInfo(
+ covariant Entity member);
/// Look up information about a loop, in case any variables it declares need
/// to be boxed/snapshotted.
@@ -352,7 +353,7 @@ class ClosureFieldElement extends ElementX
bool get hasNode => false;
- Node get node {
+ VariableDefinitions get node {
throw new SpannableAssertionFailure(
local, 'Should not access node of ClosureFieldElement.');
}
@@ -388,7 +389,8 @@ class ClosureFieldElement extends ElementX
return visitor.visitClosureFieldElement(this, arg);
}
- Element get analyzableElement => closureClass.methodElement.analyzableElement;
+ AnalyzableElement get analyzableElement =>
+ closureClass.methodElement.analyzableElement;
@override
List<FunctionElement> get nestedClosures => const <FunctionElement>[];
@@ -527,7 +529,7 @@ class BoxFieldElement extends ElementX
List<FunctionElement> get nestedClosures => const <FunctionElement>[];
@override
- Node get node {
+ VariableDefinitions get node {
throw new UnsupportedError("BoxFieldElement.node");
}
@@ -558,6 +560,7 @@ class ThisLocal extends Local {
}
/// Call method of a closure class.
+// ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
class SynthesizedCallMethodElementX extends BaseFunctionElementX
implements MethodElement {
final LocalFunctionElement expression;
@@ -586,7 +589,8 @@ class SynthesizedCallMethodElementX extends BaseFunctionElementX
FunctionExpression parseNode(ParsingContext parsing) => node;
- Element get analyzableElement => closureClass.methodElement.analyzableElement;
+ AnalyzableElement get analyzableElement =>
+ closureClass.methodElement.analyzableElement;
bool get hasResolvedAst => true;
« no previous file with comments | « pkg/compiler/analysis_options.yaml ('k') | pkg/compiler/lib/src/constants/constant_constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698