{"action":"created","issue":{"url":"https://api.github.com/repos/milessabin/shapeless/issues/645","repository_url":"https://api.github.com/repos/milessabin/shapeless","labels_url":"https://api.github.com/repos/milessabin/shapeless/issues/645/labels{/name}","comments_url":"https://api.github.com/repos/milessabin/shapeless/issues/645/comments","events_url":"https://api.github.com/repos/milessabin/shapeless/issues/645/events","html_url":"https://github.com/milessabin/shapeless/issues/645","id":182939098,"number":645,"title":"Inconsistent diverging implicit expansion with `Mapper` and `Generic`","user":{"login":"nhap96","id":14961828,"avatar_url":"https://avatars.githubusercontent.com/u/14961828?v=3","gravatar_id":"","url":"https://api.github.com/users/nhap96","html_url":"https://github.com/nhap96","followers_url":"https://api.github.com/users/nhap96/followers","following_url":"https://api.github.com/users/nhap96/following{/other_user}","gists_url":"https://api.github.com/users/nhap96/gists{/gist_id}","starred_url":"https://api.github.com/users/nhap96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhap96/subscriptions","organizations_url":"https://api.github.com/users/nhap96/orgs","repos_url":"https://api.github.com/users/nhap96/repos","events_url":"https://api.github.com/users/nhap96/events{/privacy}","received_events_url":"https://api.github.com/users/nhap96/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/milessabin/shapeless/labels/Bug","name":"Bug","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-14T00:52:00Z","updated_at":"2016-10-20T04:31:08Z","closed_at":null,"body":"Reproducing code:\r\n```scala\r\n  import shapeless._\r\n  import poly._\r\n  import shapeless.ops.hlist.Mapper\r\n\r\n  case class First(a: String) // Compiles with any number of fields\r\n\r\n  case class Second(a: String, b: String, c: String) // Does not compile with 3 or more fields\r\n\r\n  object mapper extends Poly1 {\r\n    implicit def default[T, L <: HList](\r\n      implicit gen: Generic.Aux[T, L],\r\n      mapper: Mapper[identity.type, L]\r\n    ): Case.Aux[T, Int] = null\r\n  }\r\n\r\n  Mapper[mapper.type, First :: Second :: HNil]\r\n```\r\n\r\nCompile error:\r\n```\r\n[error] .../projects/Temp/src/main/scala/main/Main.scala:20: diverging implicit expansion for type shapeless.ops.hlist.Mapper.Aux[main.Main.mapper.type,shapeless.::[main.Main.First,shapeless.::[main.Main.Second,shapeless.HNil]],shapeless.::[Int,shapeless.::[Int,shapeless.HNil]]]\r\n[error] starting with method hlistMapper1 in object Mapper\r\n[error]   implicitly[Mapper.Aux[mapper.type, First :: Second :: HNil, Int :: Int :: HNil]]\r\n[error]             ^\r\n[error] one error found\r\n```\r\n\r\nI also tried to wrap it with `Lazy` but it does help.\r\nI'm using scalac 2.11.8 and shapeless 2.3.2.\r\nThank you."},"comment":{"url":"https://api.github.com/repos/milessabin/shapeless/issues/comments/255006474","html_url":"https://github.com/milessabin/shapeless/issues/645#issuecomment-255006474","issue_url":"https://api.github.com/repos/milessabin/shapeless/issues/645","id":255006474,"user":{"login":"cmpham","id":6786062,"avatar_url":"https://avatars.githubusercontent.com/u/6786062?v=3","gravatar_id":"","url":"https://api.github.com/users/cmpham","html_url":"https://github.com/cmpham","followers_url":"https://api.github.com/users/cmpham/followers","following_url":"https://api.github.com/users/cmpham/following{/other_user}","gists_url":"https://api.github.com/users/cmpham/gists{/gist_id}","starred_url":"https://api.github.com/users/cmpham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmpham/subscriptions","organizations_url":"https://api.github.com/users/cmpham/orgs","repos_url":"https://api.github.com/users/cmpham/repos","events_url":"https://api.github.com/users/cmpham/events{/privacy}","received_events_url":"https://api.github.com/users/cmpham/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T04:31:08Z","updated_at":"2016-10-20T04:31:08Z","body":"@milessabin is there a workaround for this issue? Thanks!"}}
{"actor":{"display_login":"cmpham"}}