-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: nightly (2.2.0-dev.20161123)
Code
Uploaded to gist https://gist.github.com/vvakame/0fa2940781e68f7e79cd53d2dd3f5728
Summary
import "./jsx";
var skate: any;
const React = { createElement: skate.h };
class Component {
renderCallback() {
return <div>test</div>;
}
};
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"jsx": "react",
"jsxFactory": "skate.h",
"noEmit": false
},
"include": [
"./index.tsx"
]
}
When using --target es2015, compile succeed.
and using --noEmit, compile succeed.
Expected behavior:
Compile succeed.
Actual behavior:
Unexpected error occured.
$ ./node_modules/.bin/tsc
/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:49552
throw e;
^
TypeError: Cannot read property 'kind' of undefined
at isNameOfDeclarationWithCollidingName (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:41376:27)
at substituteIdentifier (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:41368:33)
at onSubstituteNode (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:41361:24)
at onSubstituteNode (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:42384:20)
at Object.onSubstituteNode (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:44518:20)
at emitNodeWithSubstitution (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:44732:46)
at pipelineEmitWithSubstitution (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:47022:13)
at emitNodeWithSourceMap (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:44996:24)
at pipelineEmitWithSourceMap (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:47019:13)
at emitNodeWithComments (/private/tmp/jsxFactory/node_modules/typescript/lib/tsc.js:45186:25)
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue