2015-10-13 01:27:11 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// @declaration: true
|
|
|
|
// @out: out.js
|
2015-10-28 21:56:47 +01:00
|
|
|
// @allowJs: true
|
2015-10-13 01:27:11 +02:00
|
|
|
// @Filename: b.js
|
|
|
|
// @emitThisFile: true
|
|
|
|
////function foo() { return 10; }/*1*/
|
|
|
|
|
|
|
|
// @Filename: a.ts
|
|
|
|
// @emitThisFile: true
|
|
|
|
////function foo() { return 30; }/*2*/
|
|
|
|
|
2015-10-14 21:00:43 +02:00
|
|
|
goTo.marker("1");
|
|
|
|
verify.getSemanticDiagnostics('[]');
|
2015-10-13 01:27:11 +02:00
|
|
|
goTo.marker("2");
|
2015-10-14 21:00:43 +02:00
|
|
|
verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]');
|
2015-10-13 01:27:11 +02:00
|
|
|
verify.verifyGetEmitOutputContentsForCurrentFile([
|
2015-11-18 20:26:58 +01:00
|
|
|
{ name: "out.js", text: "function foo() { return 10; }\r\nfunction foo() { return 30; }\r\n", writeByteOrderMark: false },
|
|
|
|
{ name: "out.d.ts", text: "", writeByteOrderMark: false }]);
|
2015-10-13 01:27:11 +02:00
|
|
|
goTo.marker("2");
|
2015-10-14 21:00:43 +02:00
|
|
|
verify.getSemanticDiagnostics('[\n {\n "message": "Duplicate function implementation.",\n "start": 9,\n "length": 3,\n "category": "error",\n "code": 2393\n }\n]');
|
|
|
|
goTo.marker("1");
|
|
|
|
verify.getSemanticDiagnostics('[]');
|