title: PlayFramework scala template generic types cause error: ']' expected but eof found. And error: identifier expected but $XMLSTART$< found
body: <p>I am trying add to <strong>scala</strong> <strong>templates</strong> some generic variables from <strong>java</strong>, but unfortunately no luck so far.</p>
  
  <p>I am <strong>not a scala specialist</strong>. I am only daily <strong>Java Developer</strong>.</p>
  
  <p>I've choose Play, cause seemed to as an easy one framework in Java world.
  Now I have problems with this scala templates.</p>
  
  <p>I've founded in <a href="https://twitter.github.io/scala_school/type-basics.html" rel="nofollow">scala tutorial</a> that I've to add <code>plus</code> char to defines extension.</p>
  
  <p>Here is my code:</p>
  
  <p>Entity class:</p>
  
  <pre><code>public class Insurance&lt;T&gt; {
      // some code
  }
  </code></pre>
  
  <p>List declaration (did not declare the type argument here):</p>
  
  <pre><code>List&lt;Entity&gt; entities = new LinkedList&lt;Entity&gt;();
  </code></pre>
  
  <p>Passing parameters to view template render method:</p>
  
  <pre><code>return ok(views.html.Index.render(entities));
  </code></pre>
  
  <p>And on Scala View layer:</p>
  
  <pre><code>@(entities: List[models.Entity[+T]])
  </code></pre>
  
  <p>But I am getting an errors:</p>
  
  <pre><code>[error] /home/app/views/Index.scala.html:0: identifier expected but $XMLSTART$&lt; found.
  [error] /home/app/views/Index.scala.html:150: ']' expected but eof found.
  </code></pre>
  
  <p>When I will remove generics it will work.</p>
  
  <p>Please help.</p>