{"action":"opened","issue":{"url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/issues/200","labels_url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/issues/200/comments","events_url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/issues/200/events","html_url":"https://github.com/miniboxing/miniboxing-plugin/issues/200","id":67005864,"number":200,"title":"Pattern match => missing coercion","user":{"login":"VladUreche","id":428706,"avatar_url":"https://avatars.githubusercontent.com/u/428706?v=3","gravatar_id":"","url":"https://api.github.com/users/VladUreche","html_url":"https://github.com/VladUreche","followers_url":"https://api.github.com/users/VladUreche/followers","following_url":"https://api.github.com/users/VladUreche/following{/other_user}","gists_url":"https://api.github.com/users/VladUreche/gists{/gist_id}","starred_url":"https://api.github.com/users/VladUreche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladUreche/subscriptions","organizations_url":"https://api.github.com/users/VladUreche/orgs","repos_url":"https://api.github.com/users/VladUreche/repos","events_url":"https://api.github.com/users/VladUreche/events{/privacy}","received_events_url":"https://api.github.com/users/VladUreche/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"VladUreche","id":428706,"avatar_url":"https://avatars.githubusercontent.com/u/428706?v=3","gravatar_id":"","url":"https://api.github.com/users/VladUreche","html_url":"https://github.com/VladUreche","followers_url":"https://api.github.com/users/VladUreche/followers","following_url":"https://api.github.com/users/VladUreche/following{/other_user}","gists_url":"https://api.github.com/users/VladUreche/gists{/gist_id}","starred_url":"https://api.github.com/users/VladUreche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladUreche/subscriptions","organizations_url":"https://api.github.com/users/VladUreche/orgs","repos_url":"https://api.github.com/users/VladUreche/repos","events_url":"https://api.github.com/users/VladUreche/events{/privacy}","received_events_url":"https://api.github.com/users/VladUreche/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/milestones/1","html_url":"https://github.com/miniboxing/miniboxing-plugin/milestones/0.4","labels_url":"https://api.github.com/repos/miniboxing/miniboxing-plugin/milestones/1/labels","id":823065,"number":1,"title":"0.4","description":"","creator":{"login":"VladUreche","id":428706,"avatar_url":"https://avatars.githubusercontent.com/u/428706?v=3","gravatar_id":"","url":"https://api.github.com/users/VladUreche","html_url":"https://github.com/VladUreche","followers_url":"https://api.github.com/users/VladUreche/followers","following_url":"https://api.github.com/users/VladUreche/following{/other_user}","gists_url":"https://api.github.com/users/VladUreche/gists{/gist_id}","starred_url":"https://api.github.com/users/VladUreche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladUreche/subscriptions","organizations_url":"https://api.github.com/users/VladUreche/orgs","repos_url":"https://api.github.com/users/VladUreche/repos","events_url":"https://api.github.com/users/VladUreche/events{/privacy}","received_events_url":"https://api.github.com/users/VladUreche/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":46,"state":"open","created_at":"2014-10-12T21:41:17Z","updated_at":"2015-04-07T22:39:42Z","due_on":"2015-04-11T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-04-07T22:39:42Z","updated_at":"2015-04-07T22:39:42Z","closed_at":null,"body":"```\r\n$ cat bug2.scala \r\n\r\nobject Test {\r\n  def foo[@miniboxed T](t: T, dice: String): T =\r\n    dice match {\r\n      case \"1\" => 3.asInstanceOf[T]\r\n      case \"2\" => t\r\n    }\r\n\r\n  def main(args: Array[String]): Unit = {\r\n    println(foo(5, \"1\")) // should print 3\r\n    println(foo(5, \"2\")) // should print 5\r\n  }\r\n}\r\n\r\n$ mb-scalac bug2.scala \r\n\r\n$ mb-scala Test \r\njava.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long\r\n\tat scala.runtime.BoxesRunTime.unboxToLong(BoxesRunTime.java:109)\r\n\tat Test$.foo_n_J(bug2.scala:5)\r\n\tat Test$.main(bug2.scala:10)\r\n\tat Test.main(bug2.scala)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat scala.reflect.internal.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:70)\r\n\tat scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)\r\n\tat scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:101)\r\n\tat scala.reflect.internal.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:70)\r\n\tat scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)\r\n\tat scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:22)\r\n\tat scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:39)\r\n\tat scala.tools.nsc.CommonRunner$class.runAndCatch(ObjectRunner.scala:29)\r\n\tat scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:39)\r\n\tat scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:65)\r\n\tat scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)\r\n\tat scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)\r\n\tat scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)\r\n\tat scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)\r\n```"}}