title: Cannot assign to property in protocol - Swift compiler error
body: <p>I'm banging my head against the wall with the following code in Swift. I've defined a simple protocol:</p>
  
  <pre><code>protocol Nameable {
      var name : String { get set }
  }
  </code></pre>
  
  <p>and implemented that with:</p>
  
  <pre><code>class NameableImpl : Nameable {
      var name : String = ""
  }
  </code></pre>
  
  <p>and then I have the following method in another file (don't ask me why):</p>
  
  <pre><code>func nameNameable( nameable: Nameable, name: String ) {
      nameable.name = name
  }
  </code></pre>
  
  <p>The problem is that the compiler gives the following error for the property assignment in this method:</p>
  
  <blockquote>
    <p><strong>cannot assign to 'name' in 'nameable'</strong></p>
  </blockquote>
  
  <p>I can't see what I'm doing wrong... The following code compiles fine:</p>
  
  <pre><code>var nameable : Nameable = NameableImpl()
  nameable.name = "John"
  </code></pre>
  
  <p>I'm sure it's something simple I've overlooked - what am I doing wrong?</p>