Fix baselines and function call from merging master

This commit is contained in:
Yui T 2017-04-26 15:38:58 -07:00
parent feb41f7d7c
commit 742d5150a5
5 changed files with 30 additions and 30 deletions

View File

@ -15701,7 +15701,7 @@ namespace ts {
// resolveExternalModuleName will return undefined if the moduleReferenceExpression is not a string literal
const moduleSymbol = resolveExternalModuleName(node, specifier);
if (moduleSymbol) {
const esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier);
const esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, /*dontRecursivelyResolve*/ true);
if (esModuleSymbol) {
return createPromiseReturnType(node, getTypeOfSymbol(esModuleSymbol));
}
@ -17284,7 +17284,7 @@ namespace ts {
if ((<CallExpression>node).expression.kind === SyntaxKind.ImportKeyword) {
return checkImportCallExpression(<ImportCall>node);
}
// Fall through
/* tslint:disable: no-switch-case-fall-through */
case SyntaxKind.NewExpression:
return checkCallExpression(<CallExpression>node);
case SyntaxKind.TaggedTemplateExpression:

View File

@ -1,6 +1,6 @@
tests/cases/conformance/es2018/dynamicImport/1.ts(1,1): error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
tests/cases/conformance/es2018/dynamicImport/1.ts(8,16): error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
tests/cases/conformance/es2018/dynamicImport/1.ts(1,1): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
tests/cases/conformance/es2018/dynamicImport/1.ts(8,16): error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ====
@ -9,10 +9,10 @@ tests/cases/conformance/es2018/dynamicImport/1.ts(8,16): error TS1320: Dynamic i
==== tests/cases/conformance/es2018/dynamicImport/1.ts (3 errors) ====
import("./0");
~~~~~~~~~~~~~
!!! error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
var p1 = import("./0");
~~~~~~~~~~~~~
!!! error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
p1.then(zero => {
return zero.foo();
})
@ -20,5 +20,5 @@ tests/cases/conformance/es2018/dynamicImport/1.ts(8,16): error TS1320: Dynamic i
function foo() {
const p2 = import("./0");
~~~~~~~~~~~~~
!!! error TS1320: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
!!! error TS1323: Dynamic import cannot be used when targeting ECMAScript 2015 modules.
}

View File

@ -1,8 +1,8 @@
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1322: Specifier of dynamic import cannot be spread element.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1322: Specifier of dynamic import cannot be spread element.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1321: Dynamic import must have one specifier as an argument.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(5,8): error TS1325: Specifier of dynamic import cannot be spread element.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS1135: Argument expression expected.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1321: Dynamic import must have one specifier as an argument.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts(10,12): error TS1324: Dynamic import must have one specifier as an argument.
==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts (5 errors) ====
@ -12,17 +12,17 @@ tests/cases/conformance/es2018/dynamicImport/importCallExpressionGrammarError.ts
var a = ["./0"];
import(...["PathModule"]);
~~~~~~~~~~~~~~~~~
!!! error TS1322: Specifier of dynamic import cannot be spread element.
!!! error TS1325: Specifier of dynamic import cannot be spread element.
var p1 = import(...a);
~~~~
!!! error TS1322: Specifier of dynamic import cannot be spread element.
!!! error TS1325: Specifier of dynamic import cannot be spread element.
const p2 = import();
~~~~~~~~
!!! error TS1321: Dynamic import must have one specifier as an argument.
!!! error TS1324: Dynamic import must have one specifier as an argument.
const p3 = import(,);
!!! error TS1135: Argument expression expected.
const p4 = import("pathToModule", "secondModule");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1321: Dynamic import must have one specifier as an argument.
!!! error TS1324: Dynamic import must have one specifier as an argument.

View File

@ -1,8 +1,8 @@
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'string[]'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7035: Dynamic import's specifier must be of type 'string', but here has type '() => string'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(5,8): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(6,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(7,19): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(12,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'.
tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts(13,17): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'.
==== tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStringTypeError.ts (5 errors) ====
@ -12,20 +12,20 @@ tests/cases/conformance/es2018/dynamicImport/importCallExpressionSpecifierNotStr
// Error specifier is not assignable to string
import(getSpecifier());
~~~~~~~~~~~~~~
!!! error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
var p1 = import(getSpecifier());
~~~~~~~~~~~~~~
!!! error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean'.
const p2 = import(whatToLoad ? getSpecifier() : "defaulPath")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'.
!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'boolean | "defaulPath"'.
p1.then(zero => {
return zero.foo(); // ok, zero is any
});
var p3 = import(["path1", "path2"]);
~~~~~~~~~~~~~~~~~~
!!! error TS7035: Dynamic import's specifier must be of type 'string', but here has type 'string[]'.
!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'string[]'.
var p4 = import(()=>"PathToModule");
~~~~~~~~~~~~~~~~~~
!!! error TS7035: Dynamic import's specifier must be of type 'string', but here has type '() => string'.
!!! error TS7036: Dynamic import's specifier must be of type 'string', but here has type '() => string'.

View File

@ -1,5 +1,5 @@
tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1323: Dynamic import cannot have type arguments
tests/cases/conformance/es2018/dynamicImport/1.ts(3,10): error TS1323: Dynamic import cannot have type arguments
tests/cases/conformance/es2018/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments
tests/cases/conformance/es2018/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments
==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ====
@ -9,10 +9,10 @@ tests/cases/conformance/es2018/dynamicImport/1.ts(3,10): error TS1323: Dynamic i
"use strict"
var p1 = import<Promise<any>>("./0"); // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic import cannot have type arguments
!!! error TS1326: Dynamic import cannot have type arguments
var p2 = import<>("./0"); // error
~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic import cannot have type arguments
!!! error TS1326: Dynamic import cannot have type arguments
// p1.then(value => {
// value.anyFunction();
// })