title: SwiftUI ObservedObject Binding KeyPath subscript error
body: <p>I get a compiler error trying to specify Binding on property of @ObservedObject using KeyPath for a generic type T.</p>
  
  <p>I am trying to create a generic SwiftUI View that will work for a class that has several properties of the same type. The SwiftUI View needs to be generic; however I cannot determine how to create a Binding to a property of the main object that I access through a KeyPath.   The code below returns an error of "Value of type 'T' has no subscripts"</p>
  
  <p>UPDATE:    I identified the error in my code instead of $model[keyPath: kp] I should have used $model[dynamicMember: kp].  </p>
  
  <pre><code>import SwiftUI
  
  class TestClass: ObservableObject {
      @Published public var str1: String = "one"
      @Published public var str2: String = "two"
  }
  
  struct ContentView: View { 
  
      @ObservedObject var test = TestClass()
      var body: some View {
          VStack {
              HStack{
                  Text("String One").padding(20)
                  StringView(model: test, kp: \TestClass.str1).padding(20)
              }
              HStack{
                  Text("String Two").padding(20)
                  StringView(model: test, kp: \TestClass.str2).padding(20)
              }
          }
      }
  }
  
  struct StringView&lt;T&gt;: View where T: ObservableObject {
  
      @ObservedObject var model: T
  
      var kp: ReferenceWritableKeyPath&lt;T,String&gt;
  
      init(model: T, kp: ReferenceWritableKeyPath&lt;T,String&gt;) {
          self.model = model
          self.kp = kp
      }
  
      var body: some View {
          HStack{
          TextField("String", text: $model[keyPath: kp])   &lt;--- COMPILER ERROR HERE
          Text(model[keyPath: kp])
          }
      }
  }
  
  </code></pre>
  
  <p>Is it possible to do this?</p>