{"action":"closed","issue":{"url":"https://api.github.com/repos/lihaoyi/upickle-pprint/issues/111","labels_url":"https://api.github.com/repos/lihaoyi/upickle-pprint/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/lihaoyi/upickle-pprint/issues/111/comments","events_url":"https://api.github.com/repos/lihaoyi/upickle-pprint/issues/111/events","html_url":"https://github.com/lihaoyi/upickle-pprint/issues/111","id":104003405,"number":111,"title":"Problem with default values","user":{"login":"LubomirVarga","id":13468627,"avatar_url":"https://avatars.githubusercontent.com/u/13468627?v=3","gravatar_id":"","url":"https://api.github.com/users/LubomirVarga","html_url":"https://github.com/LubomirVarga","followers_url":"https://api.github.com/users/LubomirVarga/followers","following_url":"https://api.github.com/users/LubomirVarga/following{/other_user}","gists_url":"https://api.github.com/users/LubomirVarga/gists{/gist_id}","starred_url":"https://api.github.com/users/LubomirVarga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LubomirVarga/subscriptions","organizations_url":"https://api.github.com/users/LubomirVarga/orgs","repos_url":"https://api.github.com/users/LubomirVarga/repos","events_url":"https://api.github.com/users/LubomirVarga/events{/privacy}","received_events_url":"https://api.github.com/users/LubomirVarga/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-31T07:44:23Z","updated_at":"2015-12-23T21:52:31Z","closed_at":"2015-12-23T21:52:31Z","body":"When using case class as parameter of another case class, default parameter does not work. This probably would not be base of problem. When case class have only one parameter and it has default value, it works. But (presented example), when case class has two parameters, booth with default value, it does not work.\r\n\r\nSample:\r\n```scala\r\nimport upickle.default._\r\ncase class NestedDefault(asdf: Double = null.asInstanceOf[Double], qwer: Int = null.asInstanceOf[Int])\r\nread[NestedDefault](\"\"\"{}\"\"\")\r\n/*\r\nupickle.Invalid$Data\r\n\tat upickle.GeneratedUtil$class.mapToArray(ScalaSandbox.sc0.tmp:40)\r\n\tat upickle.default$.mapToArray(ScalaSandbox.sc0.tmp:21)\r\n\tat upickle.Implicits$$anonfun$CaseR$1.applyOrElse(ScalaSandbox.sc0.tmp:78)\r\n\tat upickle.Implicits$$anonfun$CaseR$1.applyOrElse(ScalaSandbox.sc0.tmp:77)\r\n\tat scala.runtime.AbstractPartialFunction.apply(ScalaSandbox.sc0.tmp:32)\r\n\tat upickle.Types$Reader$$anonfun$read$1.applyOrElse(ScalaSandbox.sc0.tmp:89)\r\n\tat upickle.Types$Reader$$anonfun$read$1.applyOrElse(ScalaSandbox.sc0.tmp:89)\r\n\tat scala.PartialFunction$OrElse.apply(ScalaSandbox.sc0.tmp:163)\r\n\tat upickle.Types$class.readJs(ScalaSandbox.sc0.tmp:133)\r\n\tat upickle.default$.readJs(ScalaSandbox.sc0.tmp:21)\r\n\tat upickle.Types$class.read(ScalaSandbox.sc0.tmp:129)\r\n\tat upickle.default$.read(ScalaSandbox.sc0.tmp:21)\r\n\tat #worksheet#.#worksheet#(ScalaSandbox.sc0.tmp:44)\r\n*/\r\n```"}}