{"action":"opened","issue":{"url":"https://api.github.com/repos/MinecraftForge/ForgeGradle/issues/205","labels_url":"https://api.github.com/repos/MinecraftForge/ForgeGradle/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/MinecraftForge/ForgeGradle/issues/205/comments","events_url":"https://api.github.com/repos/MinecraftForge/ForgeGradle/issues/205/events","html_url":"https://github.com/MinecraftForge/ForgeGradle/issues/205","id":62646380,"number":205,"title":"Weird reobfuscation error with scala traits causes AbstractMethodError when running in obfuscated environment","user":{"login":"bdew","id":96327,"avatar_url":"https://avatars.githubusercontent.com/u/96327?v=3","gravatar_id":"","url":"https://api.github.com/users/bdew","html_url":"https://github.com/bdew","followers_url":"https://api.github.com/users/bdew/followers","following_url":"https://api.github.com/users/bdew/following{/other_user}","gists_url":"https://api.github.com/users/bdew/gists{/gist_id}","starred_url":"https://api.github.com/users/bdew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdew/subscriptions","organizations_url":"https://api.github.com/users/bdew/orgs","repos_url":"https://api.github.com/users/bdew/repos","events_url":"https://api.github.com/users/bdew/events{/privacy}","received_events_url":"https://api.github.com/users/bdew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-18T10:06:07Z","updated_at":"2015-03-18T10:06:07Z","closed_at":null,"body":"This happens if a scala trait that doesn't extend a vanilla class declares a method with the same name as something in a vanilla class, then a class mixes this trait with that class, for example:\r\n\r\n```\r\ntrait A {\r\n  def getWorldObj: World\r\n}\r\n\r\nclass B extends TileEntity with A\r\n\r\nobject C {\r\n  def foo(p: A) = p.getWorldObj\r\n  def bar(p: B) = p.getWorldObj\r\n}\r\n```\r\n\r\nThis compiles and works correctly in an unobfuscated environment.\r\nAfter reobfuscation C.bar gets changed to the obfuscated name as expected\r\n\r\n```\t \r\n0: aload_1       \r\n1: invokevirtual #30                 // Method test/B.func_145831_w:()Lnet/minecraft/world/World;\r\n4: areturn       \r\n```\r\n\r\nBut the interface and C.foo still refers to the unobfuscated name\r\n\r\n```\r\n0: aload_1       \r\n1: invokeinterface #20,  1           // InterfaceMethod test/A.getWorldObj:()Lnet/minecraft/world/World;\r\n6: areturn       \r\n```\r\n\r\nAnd a call to C.foo will crash with \r\n\r\n> java.lang.AbstractMethodError: test.B.getWorldObj()Lnet/minecraft/world/World;\r\n\r\nI made a [minimal project to demonstrate the issue](https://github.com/bdew/testmod) - it will crash in PreInit when running in an obfuscated environment.\r\n\r\n"}}