{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2118","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2118/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2118/comments","events_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2118/events","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2118","id":67101373,"number":2118,"title":"Compiler error with generic inner classes","user":{"login":"quintesse","id":778793,"avatar_url":"https://avatars.githubusercontent.com/u/778793?v=3","gravatar_id":"","url":"https://api.github.com/users/quintesse","html_url":"https://github.com/quintesse","followers_url":"https://api.github.com/users/quintesse/followers","following_url":"https://api.github.com/users/quintesse/following{/other_user}","gists_url":"https://api.github.com/users/quintesse/gists{/gist_id}","starred_url":"https://api.github.com/users/quintesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quintesse/subscriptions","organizations_url":"https://api.github.com/users/quintesse/orgs","repos_url":"https://api.github.com/users/quintesse/repos","events_url":"https://api.github.com/users/quintesse/events{/privacy}","received_events_url":"https://api.github.com/users/quintesse/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/labels/BUG","name":"BUG","color":"e10c02"},{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/labels/high%20priority","name":"high priority","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/milestones/11","html_url":"https://github.com/ceylon/ceylon-compiler/milestones/1.2","labels_url":"https://api.github.com/repos/ceylon/ceylon-compiler/milestones/11/labels","id":809477,"number":11,"title":"1.2","description":"","creator":{"login":"tombentley","id":879487,"avatar_url":"https://avatars.githubusercontent.com/u/879487?v=3","gravatar_id":"","url":"https://api.github.com/users/tombentley","html_url":"https://github.com/tombentley","followers_url":"https://api.github.com/users/tombentley/followers","following_url":"https://api.github.com/users/tombentley/following{/other_user}","gists_url":"https://api.github.com/users/tombentley/gists{/gist_id}","starred_url":"https://api.github.com/users/tombentley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombentley/subscriptions","organizations_url":"https://api.github.com/users/tombentley/orgs","repos_url":"https://api.github.com/users/tombentley/repos","events_url":"https://api.github.com/users/tombentley/events{/privacy}","received_events_url":"https://api.github.com/users/tombentley/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":228,"state":"open","created_at":"2014-10-01T08:51:07Z","updated_at":"2015-04-08T13:53:21Z","due_on":"2014-11-02T23:00:00Z","closed_at":null},"comments":4,"created_at":"2015-04-08T10:41:28Z","updated_at":"2015-04-08T13:53:21Z","closed_at":"2015-04-08T13:53:21Z","body":"The following code:\r\n\r\n```ceylon\r\nshared interface Observer<T> { }\r\n\r\nshared interface Observable<T> {\r\n    \r\n    shared default Observable<U> lift<U>() {\r\n        return object satisfies Observable<U> { };\r\n    }\r\n    \r\n    shared class FunctionsObserver<U>() satisfies Observer<U> { }\r\n}\r\n```\r\n\r\nresults in this compiler error:\r\n\r\n```\r\nerror: anonymous_0_ is not abstract and does not override abstract method <U#1>FunctionsObserver$new$(TypeDescriptor) in Observable\r\n  where U#1,T,U#2 are type-variables:\r\n    U#1 extends Object declared in method <U#1>FunctionsObserver$new$(TypeDescriptor)\r\n    T extends Object declared in interface Observable\r\n    U#2 extends Object declared in method <U#2>lift(TypeDescriptor)\r\n```\r\n\r\nif you change the `FunctionsObserver` type parameter's name from `U` to something else, say:\r\n\r\n```ceylon\r\nshared class FunctionsObserver<V>() satisfies Observer<V> { }\r\n```\r\n\r\nyou'll get a very nasty:\r\n\r\n```\r\ncom.redhat.ceylon.compiler.CompilerBugException: Bug\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.handleExitCode(CeylonCompileTool.java:519)\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:501)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:390)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:327)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:483)\r\n\tat com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:114)\r\n\tat com.redhat.ceylon.launcher.Launcher.run(Launcher.java:41)\r\n\tat com.redhat.ceylon.launcher.Launcher.run(Launcher.java:34)\r\n\tat com.redhat.ceylon.launcher.Launcher.main(Launcher.java:27)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:483)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.run(Bootstrap.java:50)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.main(Bootstrap.java:30)\r\nCaused by: java.lang.RuntimeException: Error generating bytecode for ./source/hello/test.ceylon\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCodeUnlessError(LanguageCompiler.java:785)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCode(LanguageCompiler.java:725)\r\n\tat com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1450)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.generate(LanguageCompiler.java:836)\r\n\tat com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1418)\r\n\tat com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:871)\r\n\tat com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.compile(LanguageCompiler.java:230)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:650)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:566)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:556)\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:500)\r\n\t... 16 more\r\nCaused by: java.lang.AssertionError: typeSig 19\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:367)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:413)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleClassSig(ClassWriter.java:405)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:310)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:323)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.assembleSig(ClassWriter.java:358)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.typeSig(ClassWriter.java:438)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.writeMemberAttrs(ClassWriter.java:717)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.writeMethod(ClassWriter.java:1032)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.writeMethods(ClassWriter.java:1496)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1579)\r\n\tat com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1514)\r\n\tat com.redhat.ceylon.compiler.java.codegen.CeylonClassWriter.writeClass(CeylonClassWriter.java:63)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCodeUnlessError(LanguageCompiler.java:775)\r\n\t... 27 more\r\n```\r\n\r\nThe problems go away the moment you make the inner class non-shared."},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/comments/90923601","html_url":"https://github.com/ceylon/ceylon-compiler/issues/2118#issuecomment-90923601","issue_url":"https://api.github.com/repos/ceylon/ceylon-compiler/issues/2118","id":90923601,"user":{"login":"tombentley","id":879487,"avatar_url":"https://avatars.githubusercontent.com/u/879487?v=3","gravatar_id":"","url":"https://api.github.com/users/tombentley","html_url":"https://github.com/tombentley","followers_url":"https://api.github.com/users/tombentley/followers","following_url":"https://api.github.com/users/tombentley/following{/other_user}","gists_url":"https://api.github.com/users/tombentley/gists{/gist_id}","starred_url":"https://api.github.com/users/tombentley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombentley/subscriptions","organizations_url":"https://api.github.com/users/tombentley/orgs","repos_url":"https://api.github.com/users/tombentley/repos","events_url":"https://api.github.com/users/tombentley/events{/privacy}","received_events_url":"https://api.github.com/users/tombentley/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T13:53:20Z","updated_at":"2015-04-08T13:53:20Z","body":"The second problem is now fixed. I'm going to close this, since it's now essentially a dupe of #2072."}}