aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/swift/foo.swift
diff options
context:
space:
mode:
authorGravatar Dmitry Shevchenko <dmishe@google.com>2016-04-22 20:46:07 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-22 21:21:02 +0000
commit2036dbd666a3e6430480bcbe333c77376d35bc63 (patch)
tree4f36f6cabb108be6b67cd16a40899c39462bdfee /examples/swift/foo.swift
parente7be839c1ce7df2048b86bc956207f86db4e5b65 (diff)
Add a Skylark rule to build Swift modules.
* Adds a swift_library rule that produces a (.a, .swiftmodule) pair. It can handle dependencies between modules and can be used as a dependency of objc_binary. * Does not work with Objective-C yet. -- MOS_MIGRATED_REVID=120578875
Diffstat (limited to 'examples/swift/foo.swift')
-rw-r--r--examples/swift/foo.swift9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/swift/foo.swift b/examples/swift/foo.swift
new file mode 100644
index 0000000000..067c6730cd
--- /dev/null
+++ b/examples/swift/foo.swift
@@ -0,0 +1,9 @@
+import class BarLib.Multiplier
+
+public class Foo {
+ public init() {}
+
+ public func multiply() -> Int {
+ return Multiplier().multiply(Constants.x, Constants.y)
+ }
+}