title: Swift not letting me have 2 selectors with the same name
body: <p>I am learning <a href="/questions/tagged/swift" class="post-tag" title="show questions tagged &#39;swift&#39;" rel="tag">swift</a> and I am trying to build a calculator. I am trying to create the square root function. I have already created multiply, add, subtract and divide and have a function called performOperation with two doubles. I know in Swift, I should be a able to create another function titled performOperation with a single double and <a href="/questions/tagged/swift" class="post-tag" title="show questions tagged &#39;swift&#39;" rel="tag">swift</a> is smart enough to use the correct function for the square root function, but I am getting an error at the second func performOperation line that says <strong>"method 'performOperation' with <a href="/questions/tagged/objective-c" class="post-tag" title="show questions tagged &#39;objective-c&#39;" rel="tag">objective-c</a> selector conflicts with previous declaration with the same <a href="/questions/tagged/objective-c" class="post-tag" title="show questions tagged &#39;objective-c&#39;" rel="tag">objective-c</a> selector."</strong> What am I doing wrong??</p>
  
  <p>Code below:</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController
  {
  @IBOutlet weak var display: UILabel!
  
  var userIsTyping = false
  
  @IBAction func appendDigit(sender: UIButton) {
      let digit = sender.currentTitle!
      if userIsTyping {
          display.text = display.text! + digit
      } else {
          display.text = digit
          userIsTyping = true
      }
  
  }
  
  @IBAction func operate(sender: UIButton) {
      let operation = sender.currentTitle!
      if userIsTyping {
          enter()
      }
      switch operation {
          case "×": performOperation { $0 * $1 }
          case "÷": performOperation { $1 / $0 }
          case "+": performOperation { $0 * $1 }
          case "−": performOperation { $1 - $0 }
          case "√": performOperation { sqrt($0) }
          default: break
      }
  }
  
  func performOperation(operation: (Double, Double) -&gt; Double) {
      if operandStack.count &gt;= 2 {
          displayValue = operation(operandStack.removeLast(), operandStack.removeLast())
          enter()
      }
  }
  
  func performOperation(operation: Double -&gt; Double) {
      if operandStack.count &gt;= 1 {
          displayValue = operation(operandStack.removeLast())
          enter()
      }
  }
  
  var operandStack = Array&lt;Double&gt;()
  
  @IBAction func enter() {
      userIsTyping = false
      operandStack.append(displayValue)
      println("operandStack = \(operandStack)")
  }
  
  //Changes String Value to a Double
  var displayValue: Double {
      get {
          return NSNumberFormatter().numberFromString(display.text!)!.doubleValue
      }
      set {
          display.text = "\(newValue)"
          userIsTyping = false
      }
  }
  }
  </code></pre>