{"action":"created","issue":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/1137","repository_url":"https://api.github.com/repos/lampepfl/dotty","labels_url":"https://api.github.com/repos/lampepfl/dotty/issues/1137/labels{/name}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/1137/comments","events_url":"https://api.github.com/repos/lampepfl/dotty/issues/1137/events","html_url":"https://github.com/lampepfl/dotty/issues/1137","id":137726833,"number":1137,"title":"Separate compilation with value class fails due to missing companion object","user":{"login":"smarter","id":63430,"avatar_url":"https://avatars.githubusercontent.com/u/63430?v=3","gravatar_id":"","url":"https://api.github.com/users/smarter","html_url":"https://github.com/smarter","followers_url":"https://api.github.com/users/smarter/followers","following_url":"https://api.github.com/users/smarter/following{/other_user}","gists_url":"https://api.github.com/users/smarter/gists{/gist_id}","starred_url":"https://api.github.com/users/smarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarter/subscriptions","organizations_url":"https://api.github.com/users/smarter/orgs","repos_url":"https://api.github.com/users/smarter/repos","events_url":"https://api.github.com/users/smarter/events{/privacy}","received_events_url":"https://api.github.com/users/smarter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"VladimirNik","id":2835001,"avatar_url":"https://avatars.githubusercontent.com/u/2835001?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirNik","html_url":"https://github.com/VladimirNik","followers_url":"https://api.github.com/users/VladimirNik/followers","following_url":"https://api.github.com/users/VladimirNik/following{/other_user}","gists_url":"https://api.github.com/users/VladimirNik/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirNik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirNik/subscriptions","organizations_url":"https://api.github.com/users/VladimirNik/orgs","repos_url":"https://api.github.com/users/VladimirNik/repos","events_url":"https://api.github.com/users/VladimirNik/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirNik/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-03-01T23:57:17Z","updated_at":"2016-03-03T19:32:23Z","closed_at":null,"body":"`A_1.scala`:\r\n```scala\r\nclass A(val self: Double) extends AnyVal\r\n```\r\n`B_2.scala`:\r\n```scala\r\nobject B {\r\n  def foo: A = new A(1)\r\n}\r\n```\r\n```shell\r\n% ./bin/dotc A_1.scala\r\n% ./bin/dotc B_2.scala\r\nexception occurred while compiling B.scala\r\nException in thread \"main\" java.lang.AssertionError: NoDenotation.owner\r\n        at dotty.tools.dotc.core.SymDenotations$NoDenotation.owner(SymDenotations.scala:1799)\r\n        at dotty.tools.dotc.ast.tpd$.ref(tpd.scala:346)\r\n        at dotty.tools.dotc.transform.Erasure$Boxing$.cast(Erasure.scala:230)\r\n        at dotty.tools.dotc.transform.Erasure$Boxing$$anonfun$unbox$2.apply(Erasure.scala:200)\r\n        at dotty.tools.dotc.transform.Erasure$Boxing$$anonfun$unbox$2.apply(Erasure.scala:175)\r\n...\r\n```\r\nThis does not happen if I manually create a companion in `A_1.scala`:\r\n```scala\r\nclass A(val self: Double) extends AnyVal\r\nobject A\r\n```"},"comment":{"url":"https://api.github.com/repos/lampepfl/dotty/issues/comments/191927011","html_url":"https://github.com/lampepfl/dotty/issues/1137#issuecomment-191927011","issue_url":"https://api.github.com/repos/lampepfl/dotty/issues/1137","id":191927011,"user":{"login":"odersky","id":795990,"avatar_url":"https://avatars.githubusercontent.com/u/795990?v=3","gravatar_id":"","url":"https://api.github.com/users/odersky","html_url":"https://github.com/odersky","followers_url":"https://api.github.com/users/odersky/followers","following_url":"https://api.github.com/users/odersky/following{/other_user}","gists_url":"https://api.github.com/users/odersky/gists{/gist_id}","starred_url":"https://api.github.com/users/odersky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odersky/subscriptions","organizations_url":"https://api.github.com/users/odersky/orgs","repos_url":"https://api.github.com/users/odersky/repos","events_url":"https://api.github.com/users/odersky/events{/privacy}","received_events_url":"https://api.github.com/users/odersky/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T19:32:23Z","updated_at":"2016-03-03T19:32:23Z","body":"Question to clarify:\n\nThe problem arises specifically when we read a value class from another\ndotty module via TASTY? It does not arise when unpickling Scala 2 value\nclasses?\n\n\n\nOn Thu, Mar 3, 2016 at 8:28 PM, Dmitry Petrashko <notifications@github.com>\nwrote:\n\n> @odersky <https://github.com/odersky> that's indeed independent for the\n> recent change.\n> I have suggested @VladimirNik <https://github.com/VladimirNik> to try to\n> move creation of symbols for companion objects to info-transformer of\n> FirstTransform.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/lampepfl/dotty/issues/1137#issuecomment-191925862>.\n>\n\n\n\n-- \nMartin Odersky\nEPFL\n"}}