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

Unified Diff: samples/myapi/myapi_impl.dart

Issue 1209033003: Work in progres, please take a look and give early feedback if this is the way we want to structure… (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: address comments Created 5 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 | « samples/myapi/myapi_client.cc ('k') | samples/todomvc/dart/todomvc_service.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/myapi/myapi_impl.dart
diff --git a/samples/myapi/myapi_impl.dart b/samples/myapi/myapi_impl.dart
deleted file mode 100644
index 185ea6807d7ad9a80fdf13f255e36ae81fbccd67..0000000000000000000000000000000000000000
--- a/samples/myapi/myapi_impl.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-library myapi_impl;
-
-const myapi = const Api('MyApi');
-
-int calls = 0;
-@myapi MyObject foo() {
- return (calls++ & 1 == 0) ? new Bar() : new Baz();
-}
-
-abstract class MyObject {
- @myapi void funk(MyObject o);
-}
-
-class Bar implements MyObject {
- void funk(MyObject o) {
- print("Bar!");
- if (o != null) o.funk(null);
- }
-}
-
-class Baz implements MyObject {
- void funk(MyObject o) {
- print("Baz!");
- if (o != null) o.funk(null);
- }
-}
-
-
-// ---------------------------------------------------------------
-
-class Api {
- final String name;
- const Api(this.name);
-}
« no previous file with comments | « samples/myapi/myapi_client.cc ('k') | samples/todomvc/dart/todomvc_service.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698