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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10908012: Support checked mode for field setters. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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: lib/compiler/implementation/elements/elements.dart
===================================================================
--- lib/compiler/implementation/elements/elements.dart (revision 11628)
+++ lib/compiler/implementation/elements/elements.dart (working copy)
@@ -722,27 +722,27 @@
DartType computeType(Compiler compiler) {
if (type != null) return type;
- VariableDefinitions node = parseNode(compiler);
- if (node.type !== null) {
- type = compiler.resolveTypeAnnotation(this, node.type);
- } else {
- // Is node.definitions exactly one FunctionExpression?
- Link<Node> link = node.definitions.nodes;
- if (!link.isEmpty() &&
- link.head.asFunctionExpression() !== null &&
- link.tail.isEmpty()) {
- FunctionExpression functionExpression = link.head;
- // We found exactly one FunctionExpression
- compiler.withCurrentElement(this, () {
+ compiler.withCurrentElement(this, () {
+ VariableDefinitions node = parseNode(compiler);
+ if (node.type !== null) {
+ type = compiler.resolveTypeAnnotation(this, node.type);
+ } else {
+ // Is node.definitions exactly one FunctionExpression?
+ Link<Node> link = node.definitions.nodes;
+ if (!link.isEmpty() &&
+ link.head.asFunctionExpression() !== null &&
+ link.tail.isEmpty()) {
+ FunctionExpression functionExpression = link.head;
+ // We found exactly one FunctionExpression
functionSignature =
compiler.resolveFunctionExpression(this, functionExpression);
- });
- type = compiler.computeFunctionType(compiler.functionClass,
- functionSignature);
- } else {
- type = compiler.types.dynamicType;
+ type = compiler.computeFunctionType(compiler.functionClass,
+ functionSignature);
+ } else {
+ type = compiler.types.dynamicType;
+ }
}
- }
+ });
assert(type != null);
return type;
}

Powered by Google App Engine
This is Rietveld 408576698