title: Kotlin: Reified type parameter makes Gson fail
body: <p>I've encountered a weird behavior using Gson deserializing within a function with <code>reified</code> type. It only happens when <code>interfaces</code> are involved in the type parameter.</p>
  
  <p>Take the following code:</p>
  
  <pre><code>val toBeSerialized = listOf("1337")
  with(Gson()) {
      val ser = toJson(toBeSerialized)
      val deser = fromJson&lt;List&lt;Serializable&gt;&gt;(ser)
  }
  </code></pre>
  
  <p>Line number 4 makes use of a custom extension function <code>Gson.fromJson(json: String): T</code>. </p>
  
  <p>It <strong>fails</strong> if <code>T</code> is defined as reified:</p>
  
  <pre><code>inline fun &lt;reified T&gt; Gson.fromJson(json: String): T = fromJson&lt;T&gt;(json, object : TypeToken&lt;T&gt;() {}.type)
  </code></pre>
  
  <p>And it <strong>works</strong> if it is defined as a normal type parameter:</p>
  
  <pre><code>fun &lt;T&gt; Gson.fromJson(json: String): T = fromJson&lt;T&gt;(json, object : TypeToken&lt;T&gt;() {}.type)
  </code></pre>
  
  <p>(Note that making <code>T</code> reified makes no sense here, just want to understand its impact in the special use case)</p>
  
  <p>The exception when using <code>reified</code> looks as follows:</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Unable to invoke no-args constructor for ? extends java.io.Serializable. Registering an InstanceCreator with Gson for this type may fix this problem.
      at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:226)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210)
      at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
      at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
      at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
      at com.google.gson.Gson.fromJson(Gson.java:888)
      at com.google.gson.Gson.fromJson(Gson.java:853)
      at com.google.gson.Gson.fromJson(Gson.java:802)
      at SoTestsKt.main(SoTests.kt:25)
  Caused by: java.lang.UnsupportedOperationException: Interface can't be instantiated! Interface name: java.io.Serializable
      at com.google.gson.internal.UnsafeAllocator.assertInstantiable(UnsafeAllocator.java:117)
      at com.google.gson.internal.UnsafeAllocator$1.newInstance(UnsafeAllocator.java:49)
      at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:223)
      ... 8 more
  </code></pre>