From 2afab6b2f4263223a1752b526eeb758a0cc36746 Mon Sep 17 00:00:00 2001 From: Dmitry Shevchenko Date: Fri, 13 Jan 2017 22:18:10 +0000 Subject: Fix warnings in Bazel Swift example library * Require callers to use argument labels so that the call site looks the same in Swift 2 and 3. -- PiperOrigin-RevId: 144484042 MOS_MIGRATED_REVID=144484042 --- examples/swift/BarLib/mul.swift | 4 ++-- examples/swift/foo.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/swift/BarLib/mul.swift b/examples/swift/BarLib/mul.swift index 64d66cdbea..898c0b6877 100644 --- a/examples/swift/BarLib/mul.swift +++ b/examples/swift/BarLib/mul.swift @@ -2,7 +2,7 @@ public class Multiplier { public init() {} - public func multiply(_ a: Int, _ b: Int) -> Int { - return a * b + public func multiply(a first: Int, b second: Int) -> Int { + return first * second } } diff --git a/examples/swift/foo.swift b/examples/swift/foo.swift index 1dd35c4407..4f80dad878 100644 --- a/examples/swift/foo.swift +++ b/examples/swift/foo.swift @@ -4,6 +4,6 @@ public class Foo { public init() {} public func multiply() -> Int { - return Multiplier().multiply(Constants.x, Constants.y) + return Multiplier().multiply(a: Constants.x, b: Constants.y) } } -- cgit v1.2.3