{"action":"created","issue":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/6427","repository_url":"https://api.github.com/repos/ceylon/ceylon","labels_url":"https://api.github.com/repos/ceylon/ceylon/issues/6427/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon/issues/6427/comments","events_url":"https://api.github.com/repos/ceylon/ceylon/issues/6427/events","html_url":"https://github.com/ceylon/ceylon/issues/6427","id":171096895,"number":6427,"title":"bad destructure de-sugar","user":{"login":"jvasileff","id":236050,"avatar_url":"https://avatars.githubusercontent.com/u/236050?v=3","gravatar_id":"","url":"https://api.github.com/users/jvasileff","html_url":"https://github.com/jvasileff","followers_url":"https://api.github.com/users/jvasileff/followers","following_url":"https://api.github.com/users/jvasileff/following{/other_user}","gists_url":"https://api.github.com/users/jvasileff/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasileff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasileff/subscriptions","organizations_url":"https://api.github.com/users/jvasileff/orgs","repos_url":"https://api.github.com/users/jvasileff/repos","events_url":"https://api.github.com/users/jvasileff/events{/privacy}","received_events_url":"https://api.github.com/users/jvasileff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceylon/ceylon/labels/m-typechecker","name":"m-typechecker","color":"00aa00"},{"url":"https://api.github.com/repos/ceylon/ceylon/labels/t-bug","name":"t-bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ceylon/ceylon/milestones/5","html_url":"https://github.com/ceylon/ceylon/milestones/1.3","labels_url":"https://api.github.com/repos/ceylon/ceylon/milestones/5/labels","id":1411356,"number":5,"title":"1.3","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":564,"closed_issues":0,"state":"open","created_at":"2015-11-14T01:13:20Z","updated_at":"2016-08-27T19:23:44Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2016-08-15T02:16:23Z","updated_at":"2016-08-27T19:27:00Z","closed_at":null,"body":"I can no longer compile the language module, since new code like:\r\n\r\n```ceylon\r\n[\"\"->\"\"].map((k->v) => v else \"<null>\");\r\n```\r\ndesugars to the invalid:\r\n```ceylon\r\n[\"\"->\"\"].map((entry) => let (k->v = entry) v else \"null\");\r\n```\r\nCeylon AST complains:\r\n```\r\nException in thread \"main\" ceylon.language.AssertionError \"Assertion failed: Check precedence\r\n\tviolated is DisjoiningExpression|IfElseExpression|LetExpression expression = expressionToCeylon(letClause.expression, update)\"\r\n\tat ceylon.ast.redhat.letExpressionToCeylon_.letExpressionToCeylon(LetExpression.ceylon:25)\r\n\tat ceylon.ast.redhat.expressionToCeylon_.expressionToCeylon(Expression.ceylon:31)\r\n```\r\nThe Redhat AST is:\r\n```\r\n|  |  |  |  |  |  |  |  |  |  +  [Expression] (2:27-2:41) : String\r\n|  |  |  |  |  |  |  |  |  |  |  +  [LetExpression] (2:27-2:41) : String\r\n|  |  |  |  |  |  |  |  |  |  |  |  +  [LetClause] (2:27-2:41)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  +  [Destructure] (2:18-2:21)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [ValueModifier] : unknown\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [KeyValuePattern] (2:18-2:21)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [VariablePattern] (2:18-2:18)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [Variable] (2:18-2:18) : value k => String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  + k [Identifier] (2:18-2:18)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [ValueModifier] : String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [VariablePattern] (2:21-2:21)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [Variable] (2:21-2:21) : value v => String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  + v [Identifier] (2:21-2:21)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [ValueModifier] : String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [SpecifierExpression]\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [Expression] : String->String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [BaseMemberExpression] : String->String : _0 : value run.anonymous#0._0 => String->String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  + _0 [Identifier]\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [InferredTypeArguments]\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  +  [Expression] (2:27-2:41) : String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  + else [DefaultOp] (2:27-2:41) : String\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [BaseMemberExpression] (2:27-2:27) : String : v : value v => String [!][expression type is not optional: 'String' cannot be null]\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  + v [Identifier] (2:27-2:27)\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +  [InferredTypeArguments]\r\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  + <null> [StringLiteral] (2:34-2:41) : String\r\n```"},"comment":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/comments/242935997","html_url":"https://github.com/ceylon/ceylon/issues/6427#issuecomment-242935997","issue_url":"https://api.github.com/repos/ceylon/ceylon/issues/6427","id":242935997,"user":{"login":"jvasileff","id":236050,"avatar_url":"https://avatars.githubusercontent.com/u/236050?v=3","gravatar_id":"","url":"https://api.github.com/users/jvasileff","html_url":"https://github.com/jvasileff","followers_url":"https://api.github.com/users/jvasileff/followers","following_url":"https://api.github.com/users/jvasileff/following{/other_user}","gists_url":"https://api.github.com/users/jvasileff/gists{/gist_id}","starred_url":"https://api.github.com/users/jvasileff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvasileff/subscriptions","organizations_url":"https://api.github.com/users/jvasileff/orgs","repos_url":"https://api.github.com/users/jvasileff/repos","events_url":"https://api.github.com/users/jvasileff/events{/privacy}","received_events_url":"https://api.github.com/users/jvasileff/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T19:27:00Z","updated_at":"2016-08-27T19:27:00Z","body":"@gavinking I \"need\" this in order to compile the first example. But frankly, the world won't end without it!"}}
{"actor":{"display_login":"jvasileff"}}