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

Unified Diff: samples/dartcombat/player.dart

Issue 11314019: Using 'interface' and 'abstract' for methods should produce error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: samples/dartcombat/player.dart
diff --git a/samples/dartcombat/player.dart b/samples/dartcombat/player.dart
index d49fb7005898152d6c3aa61371df09dd720538ba..29f71bcd9438184f29ac90dd2586ab2130368b2b 100644
--- a/samples/dartcombat/player.dart
+++ b/samples/dartcombat/player.dart
@@ -3,9 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
/** A local player (API known to the main isolate when creating players). */
-interface Player default PlayerImpl {
+abstract class Player {
- Player();
+ factory Player() = PlayerImpl;
final Future<SendPort> portToPlayer;
@@ -17,8 +17,8 @@ interface Player default PlayerImpl {
}
/** A remote enemy (API visible to a player to communicate with the enemy). */
-interface Enemy default EnemyImpl {
- Enemy(SendPort port);
+abstract class Enemy {
+ factory Enemy(SendPort port) = EnemyImpl;
/** tell the enemy that we are ready, receive confirmation asynchronously. */
Future<int> ready();

Powered by Google App Engine
This is Rietveld 408576698