{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/5892","labels_url":"https://api.github.com/repos/ceylon/ceylon/issues/5892/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon/issues/5892/comments","events_url":"https://api.github.com/repos/ceylon/ceylon/issues/5892/events","html_url":"https://github.com/ceylon/ceylon/issues/5892","id":125765445,"number":5892,"title":"Codegen Bug when compiling SDK","user":{"login":"ASzc","id":2424580,"avatar_url":"https://avatars.githubusercontent.com/u/2424580?v=3","gravatar_id":"","url":"https://api.github.com/users/ASzc","html_url":"https://github.com/ASzc","followers_url":"https://api.github.com/users/ASzc/followers","following_url":"https://api.github.com/users/ASzc/following{/other_user}","gists_url":"https://api.github.com/users/ASzc/gists{/gist_id}","starred_url":"https://api.github.com/users/ASzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASzc/subscriptions","organizations_url":"https://api.github.com/users/ASzc/orgs","repos_url":"https://api.github.com/users/ASzc/repos","events_url":"https://api.github.com/users/ASzc/events{/privacy}","received_events_url":"https://api.github.com/users/ASzc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon/labels/c-compiler-java","name":"c-compiler-java","color":"00aa00"},{"url":"https://api.github.com/repos/ceylon/ceylon/labels/IN%20PROGRESS","name":"IN PROGRESS","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"FroMage","id":179265,"avatar_url":"https://avatars.githubusercontent.com/u/179265?v=3","gravatar_id":"","url":"https://api.github.com/users/FroMage","html_url":"https://github.com/FroMage","followers_url":"https://api.github.com/users/FroMage/followers","following_url":"https://api.github.com/users/FroMage/following{/other_user}","gists_url":"https://api.github.com/users/FroMage/gists{/gist_id}","starred_url":"https://api.github.com/users/FroMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FroMage/subscriptions","organizations_url":"https://api.github.com/users/FroMage/orgs","repos_url":"https://api.github.com/users/FroMage/repos","events_url":"https://api.github.com/users/FroMage/events{/privacy}","received_events_url":"https://api.github.com/users/FroMage/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon/milestones/4","html_url":"https://github.com/ceylon/ceylon/milestones/1.2.1","labels_url":"https://api.github.com/repos/ceylon/ceylon/milestones/4/labels","id":1411355,"number":4,"title":"1.2.1","description":null,"creator":{"login":"CeylonMigrationBot","id":6583436,"avatar_url":"https://avatars.githubusercontent.com/u/6583436?v=3","gravatar_id":"","url":"https://api.github.com/users/CeylonMigrationBot","html_url":"https://github.com/CeylonMigrationBot","followers_url":"https://api.github.com/users/CeylonMigrationBot/followers","following_url":"https://api.github.com/users/CeylonMigrationBot/following{/other_user}","gists_url":"https://api.github.com/users/CeylonMigrationBot/gists{/gist_id}","starred_url":"https://api.github.com/users/CeylonMigrationBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeylonMigrationBot/subscriptions","organizations_url":"https://api.github.com/users/CeylonMigrationBot/orgs","repos_url":"https://api.github.com/users/CeylonMigrationBot/repos","events_url":"https://api.github.com/users/CeylonMigrationBot/events{/privacy}","received_events_url":"https://api.github.com/users/CeylonMigrationBot/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":73,"state":"open","created_at":"2015-11-14T01:13:19Z","updated_at":"2016-01-19T15:16:45Z","due_on":"2015-12-30T23:00:00Z","closed_at":null},"comments":17,"created_at":"2016-01-09T15:43:51Z","updated_at":"2016-01-19T15:26:07Z","closed_at":null,"body":"I think this problem has been affecting me in the Eclipse IDE for at least a month now (see ceylon/ceylon-ide-eclipse#1629 for the reproducer), but today I managed to get something that looks like a useful stack trace out of the CLI. The log follows.\r\n\r\n`ceylon-git` was compiled/installed today via the [ceylon-git](https://aur.archlinux.org/packages/ceylon-git/) AUR package.\r\n\r\n```\r\n[alex@elendil ceylon-sdk] (io-buffer-split=)$ git rev-parse HEAD\r\n8546f966ebb2a366d4bf8e6b2bbb7305b4c93c27\r\n[alex@elendil ceylon-sdk] (io-buffer-split=)$ ceylon-git --version\r\nceylon version 1.2.1 bd53aa1 (A Series Of Unlikely Explanations)\r\n[alex@elendil ceylon-sdk] (io-buffer-split=)$ ceylon-git compile -W\r\nerror: compiler bug: visitor didn't yield any result at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:340)\r\nerror: compiler bug: visitor didn't yield any result at unknown\r\nerror: compiler bug: ceylon.buffer.codec::ByteToByteCodec.encode was unexpectedly a member at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.addThisOrObjectQualifierIfRequired(ExpressionTransformer.java:4975)\r\nerror: compiler bug: visitor didn't yield any result at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:340)\r\nerror: compiler bug: visitor didn't yield any result at unknown\r\nerror: compiler bug: ceylon.buffer.codec::ByteToByteCodec.encode was unexpectedly a member at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.addThisOrObjectQualifierIfRequired(ExpressionTransformer.java:4975)\r\nerror: compiler bug: visitor didn't yield any result at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:340)\r\nerror: compiler bug: visitor didn't yield any result at unknown\r\nerror: compiler bug: ceylon.buffer.codec::ByteToByteCodec.decode was unexpectedly a member at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.addThisOrObjectQualifierIfRequired(ExpressionTransformer.java:4975)\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'ceylon.buffer'\r\nNote: Created module ceylon.buffer/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.test.stubs'\r\nNote: Created module test.ceylon.test.stubs/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.time'\r\nNote: Created module test.ceylon.time/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.process'\r\nNote: Created module test.ceylon.process/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.buffer'\r\nNote: Created module test.ceylon.buffer/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.interop.java'\r\nNote: Created module test.ceylon.interop.java/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'ceylon.locale'\r\nNote: Created module ceylon.locale/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.locale'\r\nNote: Created module test.ceylon.locale/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'ceylon.test'\r\nNote: Created module ceylon.test/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'ceylon.collection'\r\nNote: Created module ceylon.collection/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'ceylon.time'\r\nNote: Created module ceylon.time/1.2.1\r\nwarning: manifest attribute provided by compiler: ignoring value from 'Bundle-Version' for module 'test.ceylon.test.suite'\r\nNote: Created module test.ceylon.test.suite/1.2.1\r\nceylon compile: Fatal error: The compiler exited abnormally (4) due to a bug in the compiler.\r\nPlease report it:\r\n https://github.com/ceylon/ceylon-compiler/issues/new\r\nPlease include:\r\n\r\n* the stacktrace printed above\r\n* the stacktrace printed below\r\n* a description of what you were trying to compile.\r\n\r\nThank you!\r\ncom.redhat.ceylon.compiler.CompilerBugException: Codegen Bug\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.handleExitCode(CeylonCompileTool.java:569)\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:551)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:491)\r\n\tat com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:380)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat com.redhat.ceylon.launcher.Launcher.runInJava7Checked(Launcher.java:115)\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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.run(Bootstrap.java:55)\r\n\tat com.redhat.ceylon.launcher.Bootstrap.main(Bootstrap.java:32)\r\nCaused by: java.lang.RuntimeException: Error generating bytecode for ./test-source/test/ceylon/buffer/testBase64.ceylon\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCodeUnlessError(LanguageCompiler.java:821)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCode(LanguageCompiler.java:761)\r\n\tat com.redhat.ceylon.langtools.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1448)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.generate(LanguageCompiler.java:872)\r\n\tat com.redhat.ceylon.langtools.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1416)\r\n\tat com.redhat.ceylon.langtools.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:869)\r\n\tat com.redhat.ceylon.langtools.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:827)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.compile(LanguageCompiler.java:263)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:649)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:565)\r\n\tat com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:555)\r\n\tat com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:550)\r\n\t... 15 more\r\nCaused by: java.lang.AssertionError\r\n\tat com.redhat.ceylon.langtools.tools.javac.util.Assert.error(Assert.java:126)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$Visitor.visitTree(JCTree.java:2281)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$Visitor.visitErroneous(JCTree.java:2278)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCErroneous.accept(JCTree.java:2085)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genExpr(Gen.java:838)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitTypeCast(Gen.java:2076)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCTypeCast.accept(JCTree.java:1596)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genExpr(Gen.java:838)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitTypeCast(Gen.java:2076)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCTypeCast.accept(JCTree.java:1596)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genExpr(Gen.java:838)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genArgs(Gen.java:857)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitApply(Gen.java:1699)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1323)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genExpr(Gen.java:838)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitVarDef(Gen.java:1019)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:727)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genDef(Gen.java:685)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStat(Gen.java:720)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStat(Gen.java:706)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStats(Gen.java:757)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitLetExpr(Gen.java:2218)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$LetExpr.accept(JCTree.java:2114)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genExpr(Gen.java:838)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitExec(Gen.java:1639)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1169)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genDef(Gen.java:685)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStat(Gen.java:720)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStat(Gen.java:706)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStats(Gen.java:757)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitBlock(Gen.java:1032)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:783)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genDef(Gen.java:685)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genStat(Gen.java:720)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genMethod(Gen.java:913)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.visitMethodDef(Gen.java:886)\r\n\tat com.redhat.ceylon.langtools.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:671)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genDef(Gen.java:685)\r\n\tat com.redhat.ceylon.langtools.tools.javac.jvm.Gen.genClass(Gen.java:2255)\r\n\tat com.redhat.ceylon.compiler.java.tools.LanguageCompiler.genCodeUnlessError(LanguageCompiler.java:792)\r\n\t... 26 more\r\n```"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/comments/172887675","html_url":"https://github.com/ceylon/ceylon/issues/5892#issuecomment-172887675","issue_url":"https://api.github.com/repos/ceylon/ceylon/issues/5892","id":172887675,"user":{"login":"FroMage","id":179265,"avatar_url":"https://avatars.githubusercontent.com/u/179265?v=3","gravatar_id":"","url":"https://api.github.com/users/FroMage","html_url":"https://github.com/FroMage","followers_url":"https://api.github.com/users/FroMage/followers","following_url":"https://api.github.com/users/FroMage/following{/other_user}","gists_url":"https://api.github.com/users/FroMage/gists{/gist_id}","starred_url":"https://api.github.com/users/FroMage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FroMage/subscriptions","organizations_url":"https://api.github.com/users/FroMage/orgs","repos_url":"https://api.github.com/users/FroMage/repos","events_url":"https://api.github.com/users/FroMage/events{/privacy}","received_events_url":"https://api.github.com/users/FroMage/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T15:26:06Z","updated_at":"2016-01-19T15:26:06Z","body":"At some point the typechecker does a `getMember` (or direct, don't remember) on the scope and it looks at imports and returns that function, but then all information is lost about the primary on which it's supposed to be invoked. If the typechecker could store that info when it looks at the import list then I could use that to generate the primary."}}