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

Unified Diff: frog/member.dart

Issue 8545003: Parser fix for lambdas (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 9 years, 1 month 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 | « frog/lib/corelib_impl.dart ('k') | frog/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/member.dart
diff --git a/frog/member.dart b/frog/member.dart
index f2481da856da483d5dbecefc5793b10d64831e46..570dce4f4d38ba7656c66c690bf87fdb2bd2da43 100644
--- a/frog/member.dart
+++ b/frog/member.dart
@@ -35,13 +35,15 @@ class Parameter {
definition.value.span.start == definition.span.start) {
return;
}
- if (method.isAbstract) {
- world.error('default value not allowed on abstract methods',
- definition.span);
- } else if (method.name == '\$call' && method.definition.body == null) {
+ if (method.name == '\$call') {
// TODO(jimhug): Need simpler way to detect "true" function types vs.
// regular methods being used as function types for closures.
- world.error('default value not allowed on function type',
+ if (method.definition.body == null) {
+ world.error('default value not allowed on function type',
+ definition.span);
+ }
+ } else if (method.isAbstract) {
+ world.error('default value not allowed on abstract methods',
definition.span);
}
} else if (isInitializer && !method.isConstructor) {
« no previous file with comments | « frog/lib/corelib_impl.dart ('k') | frog/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698