{"action":"closed","issue":{"url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/10000","repository_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang","labels_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/10000/labels{/name}","comments_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/10000/comments","events_url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/issues/10000/events","html_url":"https://github.com/ballerina-platform/ballerina-lang/issues/10000","id":349474665,"node_id":"MDU6SXNzdWUzNDk0NzQ2NjU=","number":10000,"title":"Error lifting on json converted xml fails with class cast exception","user":{"login":"Kishanthan","id":690559,"node_id":"MDQ6VXNlcjY5MDU1OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/690559?v=4","gravatar_id":"","url":"https://api.github.com/users/Kishanthan","html_url":"https://github.com/Kishanthan","followers_url":"https://api.github.com/users/Kishanthan/followers","following_url":"https://api.github.com/users/Kishanthan/following{/other_user}","gists_url":"https://api.github.com/users/Kishanthan/gists{/gist_id}","starred_url":"https://api.github.com/users/Kishanthan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kishanthan/subscriptions","organizations_url":"https://api.github.com/users/Kishanthan/orgs","repos_url":"https://api.github.com/users/Kishanthan/repos","events_url":"https://api.github.com/users/Kishanthan/events{/privacy}","received_events_url":"https://api.github.com/users/Kishanthan/received_events","type":"User","site_admin":false},"labels":[{"id":828131785,"node_id":"MDU6TGFiZWw4MjgxMzE3ODU=","url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/labels/Component/BVM","name":"Component/BVM","color":"0b6664","default":false},{"id":828131123,"node_id":"MDU6TGFiZWw4MjgxMzExMjM=","url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/labels/Component/Compiler","name":"Component/Compiler","color":"0b6664","default":false},{"id":684576329,"node_id":"MDU6TGFiZWw2ODQ1NzYzMjk=","url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/labels/Severity/Major","name":"Severity/Major","color":"b60205","default":false},{"id":684576167,"node_id":"MDU6TGFiZWw2ODQ1NzYxNjc=","url":"https://api.github.com/repos/ballerina-platform/ballerina-lang/labels/Type/Bug","name":"Type/Bug","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":{"login":"SupunS","id":7834839,"node_id":"MDQ6VXNlcjc4MzQ4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/7834839?v=4","gravatar_id":"","url":"https://api.github.com/users/SupunS","html_url":"https://github.com/SupunS","followers_url":"https://api.github.com/users/SupunS/followers","following_url":"https://api.github.com/users/SupunS/following{/other_user}","gists_url":"https://api.github.com/users/SupunS/gists{/gist_id}","starred_url":"https://api.github.com/users/SupunS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SupunS/subscriptions","organizations_url":"https://api.github.com/users/SupunS/orgs","repos_url":"https://api.github.com/users/SupunS/repos","events_url":"https://api.github.com/users/SupunS/events{/privacy}","received_events_url":"https://api.github.com/users/SupunS/received_events","type":"User","site_admin":false},"assignees":[{"login":"SupunS","id":7834839,"node_id":"MDQ6VXNlcjc4MzQ4Mzk=","avatar_url":"https://avatars3.githubusercontent.com/u/7834839?v=4","gravatar_id":"","url":"https://api.github.com/users/SupunS","html_url":"https://github.com/SupunS","followers_url":"https://api.github.com/users/SupunS/followers","following_url":"https://api.github.com/users/SupunS/following{/other_user}","gists_url":"https://api.github.com/users/SupunS/gists{/gist_id}","starred_url":"https://api.github.com/users/SupunS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SupunS/subscriptions","organizations_url":"https://api.github.com/users/SupunS/orgs","repos_url":"https://api.github.com/users/SupunS/repos","events_url":"https://api.github.com/users/SupunS/events{/privacy}","received_events_url":"https://api.github.com/users/SupunS/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-10T11:08:09Z","updated_at":"2018-12-07T03:59:50Z","closed_at":"2018-12-07T03:59:50Z","author_association":"CONTRIBUTOR","body":"**Description:**\r\nFollowing error lifting scenario fails.\r\n\r\n```ballerina\r\nimport ballerina/io;\r\nfunction main (string... args) {\r\n    Contact contact = {};\r\n    xml xml1 = xml `<entry>\r\n                    <id>1234</id>\r\n                    <updated>yes</updated>\r\n                    <title>Some</title>\r\n                   </entry>`;\r\n\r\n    json json1 = xml1.toJSON({});\r\n    contact = check <Contact>json1;\r\n    string|error str = contact!entry!id;\r\n    io:println(str);\r\n}\r\n\r\ntype Entry record {\r\n    string|error id;\r\n};\r\n\r\ntype Contact record {\r\n    Entry|error entry;\r\n};\r\n\r\n```\r\n\r\n\r\nError from the compiler.\r\n\r\n```\r\njava.lang.ClassCastException: org.wso2.ballerinalang.compiler.semantics.model.symbols.BSymbol cannot be cast to org.wso2.ballerinalang.compiler.semantics.model.symbols.BConversionOperatorSymbol\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.addConversionExprIfRequired(Desugar.java:2283)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.getMatchPatternBody(Desugar.java:2247)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.generateIfElseStmt(Desugar.java:2232)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.generateIfElseStmt(Desugar.java:2202)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:873)\r\n        at org.wso2.ballerinalang.compiler.tree.statements.BLangMatch.accept(BLangMatch.java:61)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1933)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewriteStmt(Desugar.java:1943)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:549)\r\n        at org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt.accept(BLangBlockStmt.java:54)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1933)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:1735)\r\n        at org.wso2.ballerinalang.compiler.tree.expressions.BLangStatementExpression.accept(BLangStatementExpression.java:50)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewriteExpr(Desugar.java:1918)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:1144)\r\n        at org.wso2.ballerinalang.compiler.tree.expressions.BLangFieldBasedAccess.accept(BLangFieldBasedAccess.java:58)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewriteExpr(Desugar.java:1918)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:539)\r\n        at org.wso2.ballerinalang.compiler.tree.BLangVariable.accept(BLangVariable.java:91)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:555)\r\n        at org.wso2.ballerinalang.compiler.tree.statements.BLangVariableDef.accept(BLangVariableDef.java:42)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1933)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewriteStmt(Desugar.java:1943)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:549)\r\n        at org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt.accept(BLangBlockStmt.java:54)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1933)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:429)\r\n        at org.wso2.ballerinalang.compiler.tree.BLangFunction.accept(BLangFunction.java:66)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1950)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.visit(Desugar.java:295)\r\n        at org.wso2.ballerinalang.compiler.tree.BLangPackage.accept(BLangPackage.java:150)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.rewrite(Desugar.java:1893)\r\n        at org.wso2.ballerinalang.compiler.desugar.Desugar.perform(Desugar.java:255)\r\n        at org.wso2.ballerinalang.compiler.CompilerDriver.desugar(CompilerDriver.java:196)\r\n        at org.wso2.ballerinalang.compiler.CompilerDriver.compile(CompilerDriver.java:167)\r\n        at org.wso2.ballerinalang.compiler.CompilerDriver.compilePackageSymbol(CompilerDriver.java:139)\r\n        at org.wso2.ballerinalang.compiler.CompilerDriver.compilePackage(CompilerDriver.java:106)\r\n        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)\r\n        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)\r\n        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)\r\n        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)\r\n        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)\r\n        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)\r\n        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)\r\n        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)\r\n        at org.wso2.ballerinalang.compiler.Compiler.compilePackages(Compiler.java:154)\r\n        at org.wso2.ballerinalang.compiler.Compiler.compilePackage(Compiler.java:173)\r\n        at org.wso2.ballerinalang.compiler.Compiler.compile(Compiler.java:85)\r\n        at org.wso2.ballerinalang.compiler.Compiler.compile(Compiler.java:76)\r\n        at org.ballerinalang.launcher.LauncherUtils.compile(LauncherUtils.java:258)\r\n        at org.ballerinalang.launcher.LauncherUtils.runProgram(LauncherUtils.java:87)\r\n        at org.ballerinalang.launcher.Main$RunCmd.execute(Main.java:256)\r\n        at java.util.Optional.ifPresent(Optional.java:159)\r\n        at org.ballerinalang.launcher.Main.main(Main.java:66)\r\n```"}}
{"actor":{"display_login":"Shan1024"}}