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

Unified Diff: frog/member.dart

Issue 8534001: Adds typechecking of return values (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
Index: frog/member.dart
diff --git a/frog/member.dart b/frog/member.dart
index 95ad4d4693e6e6b5b0bb0a5f99416f8988b123c1..27d73a7c09405725c0878aa83b68c92450c373f0 100644
--- a/frog/member.dart
+++ b/frog/member.dart
@@ -124,17 +124,20 @@ class Member implements Named {
bool get requiresFieldSyntax() => false;
bool get isNative() => false;
- String get constructorName() =>
- world.internalError('can not be a constructor', span);
+ String get constructorName() {
+ world.internalError('can not be a constructor', span);
+ }
void provideFieldSyntax() => world.internalError('can not be field', span);
void providePropertySyntax() =>
world.internalError('can not be property', span);
- Definition get initDelegate() =>
- world.internalError('cannot have initializers', span);
- Definition set initDelegate(ctor) =>
- world.internalError('cannot have initializers', span);
+ Definition get initDelegate() {
+ world.internalError('cannot have initializers', span);
+ }
+ Definition set initDelegate(ctor) {
+ world.internalError('cannot have initializers', span);
+ }
Definition get definition() => null;
@@ -282,7 +285,7 @@ class FieldMember extends Member {
bool get requiresFieldSyntax() => isNative;
void provideFieldSyntax() {} // Nothing to do.
- void providePropertySyntax() => _providePropertySyntax = true;
+ void providePropertySyntax() { _providePropertySyntax = true; }
FieldMember(String name, Type declaringType, this.definition, this.value)
: super(name, declaringType), isNative = false;
@@ -421,7 +424,7 @@ class PropertyMember extends Member {
bool get prefersPropertySyntax() => true;
bool get requiresFieldSyntax() => false;
- void provideFieldSyntax() => _provideFieldSyntax = true;
+ void provideFieldSyntax() { _provideFieldSyntax = true; }
void providePropertySyntax() {}// Nothing to do.
// TODO(jimhug): Union of getter and setters sucks!
@@ -714,8 +717,8 @@ class MethodMember extends Member {
bool get prefersPropertySyntax() => true;
bool get requiresFieldSyntax() => false;
- void provideFieldSyntax() => _provideFieldSyntax = true;
- void providePropertySyntax() => _providePropertySyntax = true;
+ void provideFieldSyntax() { _provideFieldSyntax = true; }
+ void providePropertySyntax() { _providePropertySyntax = true; }
Value _set(MethodGenerator context, Node, Value target, Value value,
[bool isDynamic=false]) {

Powered by Google App Engine
This is Rietveld 408576698