{"action":"closed","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/1053","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/1053/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/1053/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/1053/events","html_url":"https://github.com/google/closure-compiler/issues/1053","id":98308645,"number":1053,"title":"Instance property incorrectly inferred as null when base class is in another module.  in ES6.","user":{"login":"rintaro","id":142081,"avatar_url":"https://avatars.githubusercontent.com/u/142081?v=3","gravatar_id":"","url":"https://api.github.com/users/rintaro","html_url":"https://github.com/rintaro","followers_url":"https://api.github.com/users/rintaro/followers","following_url":"https://api.github.com/users/rintaro/following{/other_user}","gists_url":"https://api.github.com/users/rintaro/gists{/gist_id}","starred_url":"https://api.github.com/users/rintaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rintaro/subscriptions","organizations_url":"https://api.github.com/users/rintaro/orgs","repos_url":"https://api.github.com/users/rintaro/repos","events_url":"https://api.github.com/users/rintaro/events{/privacy}","received_events_url":"https://api.github.com/users/rintaro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/closure-compiler/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/google/closure-compiler/labels/ES6","name":"ES6","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"MatrixFrog","id":244381,"avatar_url":"https://avatars.githubusercontent.com/u/244381?v=3","gravatar_id":"","url":"https://api.github.com/users/MatrixFrog","html_url":"https://github.com/MatrixFrog","followers_url":"https://api.github.com/users/MatrixFrog/followers","following_url":"https://api.github.com/users/MatrixFrog/following{/other_user}","gists_url":"https://api.github.com/users/MatrixFrog/gists{/gist_id}","starred_url":"https://api.github.com/users/MatrixFrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatrixFrog/subscriptions","organizations_url":"https://api.github.com/users/MatrixFrog/orgs","repos_url":"https://api.github.com/users/MatrixFrog/repos","events_url":"https://api.github.com/users/MatrixFrog/events{/privacy}","received_events_url":"https://api.github.com/users/MatrixFrog/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-07-31T03:18:26Z","updated_at":"2015-08-20T17:59:42Z","closed_at":"2015-08-20T17:59:42Z","body":"test.js\r\n```javascript\r\nimport {Base} from './test_Base';\r\n\r\nclass Child {\r\n  constructor() {}\r\n}\r\n\r\nclass Foo extends Base {\r\n\r\n  constructor() {\r\n    /** \r\n     * @type {Child}\r\n     */\r\n    this._child = null;\r\n    super();\r\n  }\r\n\r\n  /** \r\n   * @return {!Child}\r\n   */\r\n  child() {\r\n    if(this._child == null) {\r\n      this._child = new Child();\r\n    }   \r\n    return /** @type {!Child} */(this._child);\r\n  }\r\n}\r\n\r\nlet foo = new Foo();\r\nconsole.log(foo.child());\r\n```\r\n\r\ntest_Base.js\r\n```javascript\r\nexport class Base {\r\n  constructor() {\r\n    console.log(\"Base.construct\")\r\n  }\r\n}\r\n```\r\n\r\nIt seems, the compiler infers `Foo._child` as `null`, not `(Child|null)`\r\n```\r\n$ java -jar closure-compiler/build/compiler.jar --version\r\nClosure Compiler (http://github.com/google/closure-compiler)\r\nVersion: v20150609-412-gbe020b8\r\nBuilt on: 2015/07/31 11:57\r\n\r\n$ java -jar closure-compiler/build/compiler.jar --jscomp_error checkTypes --language_in=ECMASCRIPT6_STRICT --language_out=ES5 --manage_closure_dependencies true test_Base.js test.js\r\ntest.js:21: ERROR - condition always evaluates to true\r\nleft : null\r\nright: null\r\n    if(this._child == null) {\r\n       ^\r\n\r\n1 error(s), 0 warning(s), 97.7% typed\r\n```\r\n\r\nIt correctly compiles when `class Base` is in the same file of `class Foo`."}}