{"id":4907,"date":"2014-03-30T16:51:35","date_gmt":"2014-03-30T16:51:35","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-is-possible-to-capture-the-type-parameter-of-a-trait-using-manifests-in-scala-2-7-7-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:51:35","modified_gmt":"2014-03-30T16:51:35","slug":"is-is-possible-to-capture-the-type-parameter-of-a-trait-using-manifests-in-scala-2-7-7-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/is-is-possible-to-capture-the-type-parameter-of-a-trait-using-manifests-in-scala-2-7-7-collection-of-common-programming-errors\/","title":{"rendered":"Is is possible to capture the type parameter of a trait using Manifests in Scala 2.7.7?-Collection of common programming errors"},"content":{"rendered":"<p>I found a solution that works, but it&#8217;s pretty awkward since it requires the test class to call a method (clazz) on the trait before any of the trait&#8217;s lazy vals are evaluated.<\/p>\n<pre><code>\/**\n * Utility trait for HttpUnit\/ServletUnit tests\n * \n * @param [T] Type parameter for the class under test\n *\/\ntrait ServletUnitTest[T<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I found a solution that works, but it&#8217;s pretty awkward since it requires the test class to call a method (clazz) on the trait before any of the trait&#8217;s lazy vals are evaluated. \/** * Utility trait for HttpUnit\/ServletUnit tests * * @param [T] Type parameter for the class under test *\/ trait ServletUnitTest[T<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4907","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4907"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4907\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}