Commit graph

741 commits

Author SHA1 Message Date
Mohamed Hegazy
19854a0386 Add TypedArray tests 2014-11-17 11:16:03 -08:00
Mohamed Hegazy
25ce5db7f3 Merge branch 'master' into es6Typings
Conflicts:
	src/harness/harness.ts
	src/lib/core.d.ts
2014-11-17 11:15:46 -08:00
Anders Hejlsberg
9a1b031469 Accepting new baselines. 2014-11-17 10:46:02 -08:00
Dick van den Brink
c90fb4a7d3 Update baseline 2014-11-16 22:05:07 +01:00
Dick van den Brink
e7bb2e0ba7 Merge branch 'master' into warnaserror
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/types.ts
	src/harness/harness.ts
2014-11-16 22:02:00 +01:00
Yui T
880e958d11 Fix comment 2014-11-14 16:30:03 -08:00
Yui T
03e0722927 Add test cases and rename test files 2014-11-14 15:44:06 -08:00
Anders Hejlsberg
bdfb5697af Merge pull request #1163 from Microsoft/typeGuards
Fixes to type guards
2014-11-14 15:36:07 -08:00
Anders Hejlsberg
df544a687c Addressing CR feedback 2014-11-14 13:36:09 -08:00
Anders Hejlsberg
91b97009f0 Modifying tests and accepting new baselines 2014-11-14 10:42:31 -08:00
Daniel Rosenwasser
5646743559 Added tests for defining TemplateStringsArray in certain contexts. 2014-11-13 15:17:53 -08:00
Yui T
a8ebdf0cbd Address code review 2014-11-13 12:02:13 -08:00
Gabriel Isenberg
843d3ec7ca Added a compiler test for named AMD modules. 2014-11-13 11:00:06 -08:00
Daniel Rosenwasser
828e31b318 Baselines, using 'unknown' as a default type. 2014-11-12 18:08:16 -08:00
Sheetal Nandi
152c77cd2a Add test cases for typeof x == s and typeof x != s form of typeguard which has no effect on narrowing type 2014-11-12 12:49:29 -08:00
Sheetal Nandi
45ca9d285f Add test case for instance of type guard with interface with prototype property 2014-11-12 12:36:06 -08:00
Sheetal Nandi
c0b26a9691 Merge branch 'master' into typeGuardConformance 2014-11-12 12:24:43 -08:00
Sheetal Nandi
b1297b2b65 Instead of setting fresh value, or the value with existing one of if alias is referenced in value position
Fixes #1130
2014-11-11 23:49:57 -08:00
Sheetal Nandi
ce51343e73 Adding testcase for the incorrect eliding of the import declarations 2014-11-11 23:38:18 -08:00
Sheetal Nandi
63a20863c1 Fix the relative path reference resolution
Fixes #1039
2014-11-11 23:06:45 -08:00
Sheetal Nandi
8c2091bca5 Add tests to cover scenarios for relative path reference resolution 2014-11-11 23:06:35 -08:00
Sheetal Nandi
4c28e73372 All the identifiers need to be escaped to make sure compiler doesnt confuse __NonUnderscore character incorrectly
Fixes #548
2014-11-11 15:44:25 -08:00
Daniel Rosenwasser
7a5c360025 Merge pull request #1072 from Microsoft/taggedTemplates
Type checking for tagged template expressions
2014-11-11 13:54:26 -08:00
Yui T
bb7a0aa9d9 Add conformance tests 2014-11-11 11:31:45 -08:00
Sheetal Nandi
57af2623c6 If we are comparing left hand side for is position of type node, it is false, because it is namespace position and not type position
Fixes #837
2014-11-10 19:19:33 -08:00
Sheetal Nandi
60f79da623 Show error for visibility only on the identifier resulting the error 2014-11-10 18:50:28 -08:00
Sheetal Nandi
acff59f029 Test case for visibility error in the type literal 2014-11-10 18:47:51 -08:00
Sheetal Nandi
d6fb678222 Test cases for type alias declaration emit and privacy check.
Also removed the unnecessary error messages for type alias privacy check
2014-11-10 18:28:05 -08:00
Sheetal Nandi
5664b6fcf9 Test cases for type annotation visibility errors 2014-11-10 18:10:00 -08:00
Sheetal Nandi
c661ffa7ec Test cases for type literal annotation 2014-11-10 17:15:26 -08:00
Sheetal Nandi
9e41b0fed4 Test case for string literal overload type annotation 2014-11-10 17:09:34 -08:00
Sheetal Nandi
c2188a329d Test case for paren type annotation 2014-11-10 17:08:50 -08:00
Sheetal Nandi
68a07ed0a9 Test cases for union type annotation 2014-11-10 17:01:38 -08:00
Sheetal Nandi
5207bd9625 Type annotation of tuple type emit in the declaration file 2014-11-10 17:01:35 -08:00
Sheetal Nandi
737b72d73d Test cases for array type annotation 2014-11-10 17:01:31 -08:00
Sheetal Nandi
ab1558828a Test cases for type query 2014-11-10 17:01:28 -08:00
Sheetal Nandi
e11fa3fcc7 Tests for type reference annotation 2014-11-10 17:01:24 -08:00
Sheetal Nandi
cee6452e93 Tests for built in type name reference in type annotation 2014-11-10 17:01:21 -08:00
Sheetal Nandi
ffdb0fc45d Show error about entity name visibility on entity name resulting in the error 2014-11-10 17:01:17 -08:00
Sheetal Nandi
7719f39faf Update the baselines 2014-11-10 17:01:09 -08:00
Mohamed Hegazy
13a6487cd3 Merge branch 'master' into es6Typings
Conflicts:
	tests/baselines/reference/arrayTypeOfTypeOf.errors.txt
	tests/baselines/reference/redefineArray.errors.txt
2014-11-10 16:46:02 -08:00
Yui T
7e39622d5d Basic implementation for finding all references 2014-11-10 14:55:41 -08:00
Daniel Rosenwasser
6d353c078c Merge branch 'master' into taggedTemplates 2014-11-07 16:24:40 -08:00
Daniel Rosenwasser
d99023ed98 Merge pull request #1094 from Microsoft/findAllRefsInTemplates
Corrected isExpression for templates.
2014-11-07 16:24:22 -08:00
Daniel Rosenwasser
986a0b7343 Fixed issues with incomplete calls, cleaned some code up. 2014-11-07 16:23:59 -08:00
Daniel Rosenwasser
c9919bb9ec Added baselines. 2014-11-07 14:13:38 -08:00
Sheetal Nandi
8ab038f1a3 Fixed the merge conflicts that went undetected in github 2014-11-06 18:02:29 -08:00
Sheetal Nandi
9e2eb3bc03 Merge pull request #1058 from Microsoft/contextualUnionTypeConformance
Contextual union type conformance test cases and Fix for contextual union signature
2014-11-06 16:25:40 -08:00
Sheetal Nandi
727f36ad02 Merge pull request #1080 from Microsoft/breakpointTypeAlias
Breakpoint type alias
2014-11-06 16:24:56 -08:00
Sheetal Nandi
e4c88eeae1 Breakpoint validation for Let and cost 2014-11-06 15:49:59 -08:00
Sheetal Nandi
61c45816c4 Type aliases cannot have breakpoints 2014-11-06 15:40:28 -08:00
Sheetal Nandi
1e4f0b81fa Verify breakpoints in type alias syntax 2014-11-06 15:38:47 -08:00
Sheetal Nandi
da314a3774 Merge pull request #1041 from Microsoft/declFilePrivateMethodOverload
Declaration file emit for private method overloads
2014-11-06 14:54:06 -08:00
Sheetal Nandi
52a8560298 Typeguards of form !expr
•	A type guard of the form !expr
o	when true, narrows the type of x by expr when false, or
o	when false, narrows the type of x by expr when true.
2014-11-06 13:04:43 -08:00
Sheetal Nandi
c9a03dc659 Typeguards of form expr1 || expr2
•	A type guard of the form expr1 || expr2
o	when true, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when true, and T2 is the type of x narrowed by expr1 when false and then by expr2 when true, or
o	when false, narrows the type of x by expr1 when false and then by expr2 when false.
2014-11-06 13:04:40 -08:00
Sheetal Nandi
486d37ec90 TypeGuard of for expr1 && expr2
•	A type guard of the form expr1 && expr2
o	when true, narrows the type of x by expr1 when true and then by expr2 when true, or
o	when false, narrows the type of x to T1 | T2, where T1 is the type of x narrowed by expr1 when false, and T2 is the type of x narrowed by expr1 when true and then by expr2 when false.
2014-11-06 13:04:37 -08:00
Sheetal Nandi
7ebf5371a5 Test cases for typeguards of form typeof x === s and typeof x !== s
•	A type guard of the form typeof x === s, where s is a string literal with the value ‘string’, ‘number’, or ‘boolean’,
o	when true, narrows the type of x to the given primitive type, or
o	when false, removes the primitive type from the type of x.
•	A type guard of the form typeof x === s, where s is a string literal with any value but ‘string’, ‘number’, or ‘boolean’,
o	when true, removes the primitive types string, number, and boolean from the type of x, or
o	when false, has no effect on the type of x.
•	A type guard of the form typeof x !== s, where s is a string literal,
o	when true, narrows the type of x by typeof x === s when false, or
o	when false, narrows the type of x by typeof x === s when true.
2014-11-06 13:04:34 -08:00
Sheetal Nandi
5961ed7154 Test typeguard of form instance of
•	A type guard of the form x instanceof C, where C is of a subtype of the global type ‘Function’ and C has a property named ‘prototype’
o	when true, narrows the type of x to the type of the ‘prototype’ property in C provided it is a subtype of the type of x, or
o	when false, has no effect on the type of x.
2014-11-06 13:04:30 -08:00
Sheetal Nandi
2fecc132ab Tests for typeguards allowed on variables and parameters only
From spec:
Note that type guards affect types of variables and parameters only and have no effect on members of objects such as properties
2014-11-06 13:04:27 -08:00
Sheetal Nandi
33cdc2f876 Type guards in || operator
•	In the right operand of a || operation, the type of a variable or parameter is narrowed by any type guard in the left operand when false, provided the right operand contains no assignments to the variable or parameter.
2014-11-06 13:04:24 -08:00
Sheetal Nandi
11912e8fde TypeGuards in right operand of && operation
•	In the right operand of a && operation, the type of a variable or parameter is narrowed by any type guard in the left operand when true, provided the right operand contains no assignments to the variable or parameter.
2014-11-06 13:04:21 -08:00
Sheetal Nandi
55952af304 Tests for conditional expression typeguards
•	In the true expression of a conditional expression, the type of a variable or parameter is narrowed by any type guard in the condition when true, provided the expression contains no assignments to the variable or parameter.
•	In the false expression of a conditional expression, the type of a variable or parameter is narrowed by any type guard in the condition when false, provided the expression contains no assignments to the variable or parameter.
2014-11-06 13:04:18 -08:00
Sheetal Nandi
4b3d603f24 Test cases for typeguards are scoped at function /module block 2014-11-06 13:04:14 -08:00
Sheetal Nandi
2088a89223 Test cases to make sure typeguard is defeated in case of function calls
From spec:
Also note that it is possible to defeat a type guard by calling a function that changes the type of the guarded variable.
2014-11-06 13:04:11 -08:00
Sheetal Nandi
e79bec5cbf TypeGuards narrow types in if statement works per spec:
The type of a variable or parameter is narrowed in the following situations:
•	In the true branch statement of an ‘if’ statement, the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when true, provided the if statement contains no assignments to the variable or parameter.
•	In the false branch statement of an ‘if’ statement, the type of a variable or parameter is narrowed by any type guard in the ‘if’ condition when false, provided the if statement contains no assignments to the variable or parameter.
2014-11-06 13:04:08 -08:00
Daniel Rosenwasser
bcddb101aa Proper type arg inference with apppropriate overload res tests. 2014-11-05 18:20:40 -08:00
Daniel Rosenwasser
fea1165186 Merge branch 'master' into taggedTemplates 2014-11-05 14:06:19 -08:00
Daniel Rosenwasser
e12e31b144 Removed duplicate diagnostic. 2014-11-05 12:26:03 -08:00
Anders Hejlsberg
d8080a0b46 Merge pull request #1035 from Microsoft/improvedTypeInference
Improved type inference (fixes #1011)
2014-11-04 17:09:31 -08:00
Sheetal Nandi
9d31631fd7 Test cases of function infering return type of functions
if f is a contextually typed function expression (section 4.9.3), the inferred return type is the union type (section 3.3.4) of the types of the return statement expressions in the function body, ignoring return statements with no expressions.
Otherwise, the inferred return type is the first of the types of the return statement expressions in the function body that is a supertype (section 3.8.3) of each of the others, ignoring return statements with no expressions. A compile-time error occurs if no return statement expression has a type that is a supertype of each of the others.
2014-11-04 16:40:56 -08:00
Sheetal Nandi
40af15c8ff Array literal produces union type if the it is not contextually typed 2014-11-04 15:58:44 -08:00
Sheetal Nandi
a5cea935af Tests for contextual index signature of union type
Let S be the set of types in U that has a string index signature. If S is not empty, U has a string index signature of a union type of the types of the string index signatures from each type in S.
Let S be the set of types in U that has a numeric index signature. If S is not empty, U has a numeric index signature of a union type of the types of the numeric index signatures from each type in S.
2014-11-04 15:33:32 -08:00
Daniel Rosenwasser
1508350cb8 Merge branch 'master' into taggedTemplates
Conflicts:
	tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt
2014-11-04 15:24:21 -08:00
Daniel Rosenwasser
56027663bf Initial work on overload resolution with tagged templates.
Currently type argument inference breaks hard when the first parameter of a tag has a generic type.
2014-11-04 15:05:05 -08:00
Sheetal Nandi
c4e632746e Fix the logic in getting the contextual signature of union type as per spec
Fixes #1054
2014-11-04 14:49:15 -08:00
Sheetal Nandi
c5b4051f3a Test cases for contextual typing of union type members 2014-11-04 13:33:43 -08:00
Sheetal Nandi
1ca9273f49 Identity of union type 2014-11-04 13:18:50 -08:00
Sheetal Nandi
16fc7a22e2 Tests for union type literals
A union type literal is written as a sequence of types separated by vertical bars.
UnionType:
PrimaryOrUnionType   |   PrimaryType
A union typle literal references a union type.
When function or constructor types are included in union types they must be enclosed in parentheses
2014-11-04 13:18:47 -08:00
Sheetal Nandi
24ebc750c0 Tests for Conditional operator can generate union type 2014-11-04 13:18:43 -08:00
Sheetal Nandi
b66cd9b0fc Results of || operation produces union type 2014-11-04 13:18:40 -08:00
Sheetal Nandi
49b5b5ab99 Tests for union of index signatures:
•	If each type in U has a string index signature, U has a string index signature of a union type of the types of the string index signatures from each type in U.
•	If each type in U has a numeric index signature, U has a numeric index signature of a union type of the types of the numeric index signatures from each type in U.
2014-11-04 13:18:37 -08:00
Sheetal Nandi
c2b2c306af Tests for union of construct signatures
If each type in U has construct signatures and the sets of construct signatures are identical ignoring return types, U has the same set of construct signatures, but with return types that are unions of the return types of the respective construct signatures from each type in U.
2014-11-04 13:18:34 -08:00
Sheetal Nandi
2b8342bd79 Tests for union of call signatures
If each type in U has call signatures and the sets of call signatures are identical ignoring return types, U has the same set of call signatures, but with return types that are unions of the return types of the respective call signatures from each type in U.
2014-11-04 13:18:30 -08:00
Sheetal Nandi
357bd87612 Tests for union members:
If each type in U has a property P, U has a property P of a union type of the types of P from each type in U.
2014-11-04 13:18:27 -08:00
Sheetal Nandi
1f3653b32e Tests for assignment compatibility of union types
•	A union type U is assignable to a type T if each type in U is assignable to T.
•	A type T is assignable to a union type U if T is assignable to any type in U.
2014-11-04 13:18:24 -08:00
Sheetal Nandi
703cd5d4cf Tests for checking if type S is subtype of union type
T is a union type and S is a subtype of at least one constituent type of T
2014-11-04 13:18:20 -08:00
Sheetal Nandi
a1535533e7 Tests for source (S) of subtype is union type (U)
A union type U is a subtype of a type T if each type in U is a subtype of T
2014-11-04 13:18:17 -08:00
Sheetal Nandi
568049474e Tests to check equivalency of union types
A union type encompasses an unordered set of unrelated types (that is, types that aren’t subtypes of each other). The following rules govern union types:
•	A | B is equivalent to A if B is a subtype of A.
•	A | B is equivalent to B | A.
•	AB | C is equivalent to A | BC, where AB is A | B and BC is B | C.
2014-11-04 13:18:14 -08:00
Sheetal Nandi
7634f741d9 Conformance tests for array element type of tuple is union type of tuple element types 2014-11-04 13:18:11 -08:00
vladima
95ec8c065f add test for const enum that is initialized with enum member defined above 2014-11-04 12:13:19 -08:00
Cyrus Najmabadi
b97c0b434b Update test. 2014-11-03 18:42:26 -08:00
Cyrus Najmabadi
ecd31b6f6f Emit case clause statements on the same line if that's how they were written in source. 2014-11-03 18:36:01 -08:00
Anders Hejlsberg
4c4484be05 Accepting new baselines 2014-11-03 14:29:23 -08:00
Vladimir Matveev
f801ec1d17 Merge pull request #970 from Microsoft/fold_computed_enum_members
Const enums, resolves #1029
2014-11-03 14:10:38 -08:00
Sheetal Nandi
3ce841466d Declaration file emit for private method overloads (#1018) 2014-11-03 12:50:32 -08:00
vladima
4d354c0286 addressed CR feedback: adjusted text of error messages, added description to 'preserveConstEnums' command line argument 2014-11-03 11:13:32 -08:00
Vladimir Matveev
cba9b7ff5e fixed typo 2014-11-02 16:20:00 -08:00
Anders Hejlsberg
edb6543354 Accepting new baselines 2014-11-02 15:21:10 -08:00
Vladimir Matveev
6b1a96ca29 added basic set of tests for type aliases 2014-11-02 13:34:04 -08:00
Vladimir Matveev
d86d520c33 merge with master 2014-11-02 12:31:44 -08:00
Vladimir Matveev
fe7d056724 initial version of spec conformance tests for type aliases 2014-11-01 23:54:55 -07:00
Vladimir Matveev
2d94030f58 inline enum constant values for indexed access when index is string literal 2014-11-01 18:16:48 -07:00
Anders Hejlsberg
0c5057e913 Accepting updated baselines 2014-11-01 15:30:07 -07:00
Vladimir Matveev
0b738e86c4 merge with master 2014-11-01 02:06:37 -07:00
Vladimir Matveev
8662c689b3 add test for 'preserveConstEnums' command line argument 2014-11-01 01:06:06 -07:00
Vladimir Matveev
7d80b7186d do not treat module that contains only const enums as instantiated 2014-11-01 00:56:00 -07:00
Daniel Rosenwasser
3e8978fb60 Merge branch 'master' into templates 2014-10-31 14:54:12 -07:00
Anders Hejlsberg
bf3a62909b Addressing feedback and adding regression tests 2014-10-31 14:23:29 -07:00
Anders Hejlsberg
4555090cc9 Accepting new baselines 2014-10-31 10:19:31 -07:00
Vladimir Matveev
ac54fbfa46 set 'earlyError' bit to 'non-constant expression in constant enum initializer' error 2014-10-30 23:05:18 -07:00
Vladimir Matveev
dd57c6c5c0 added .d.ts generation tests 2014-10-30 22:48:32 -07:00
Vladimir Matveev
270d18711c addressed CR feedback 2014-10-30 00:55:44 -07:00
Vladimir Matveev
4aa4ea75d1 allow arithmetic operations in constant expressions, handle infinity\NaN results 2014-10-29 23:21:30 -07:00
Dick van den Brink
4c1397b9a6 Added test for noEmitOnError 2014-10-30 00:10:58 +01:00
Vladimir Matveev
e949eda583 const enums, iteration 1: const enums can be used in imports, const enums can be merged only with const enums. 2014-10-29 00:17:16 -07:00
Vladimir Matveev
6f4ea86227 merge with master 2014-10-28 21:49:58 -07:00
Mohamed Hegazy
fe4a96e1bd Allow static side of native types to be extended 2014-10-28 21:21:47 -07:00
Daniel Rosenwasser
35cf95c146 Merge branch 'master' into templates
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/types.ts
	src/services/utilities.ts
2014-10-28 19:06:07 -07:00
Daniel Rosenwasser
d522c88295 Merge branch 'master' into templates
Conflicts:
	src/compiler/checker.ts
	src/services/services.ts
2014-10-28 18:49:35 -07:00
Daniel Rosenwasser
b8535d339c Omit empty template tail literals. 2014-10-28 18:47:43 -07:00
Daniel Rosenwasser
aabfebd40e Fixed emit for parenthesized template expressions. 2014-10-28 18:47:29 -07:00
Daniel Rosenwasser
7fad76955e Merge branch 'master' into templates 2014-10-28 18:43:43 -07:00
Daniel Rosenwasser
6e77e2e810 Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
2014-10-28 00:48:58 -07:00
Vladimir Matveev
2dd9511b0a 'const enum' iteration 0. TODO: allow and track const enums in imports, add more tests 2014-10-27 23:56:07 -07:00
Vladimir Matveev
329d6e2f13 merge with master 2014-10-27 21:13:34 -07:00
Vladimir Matveev
365587f6bf addressed CR feedback, added support for indexed access 2014-10-26 23:42:20 -07:00
Vladimir Matveev
ce336bcec7 added folding for references to enum members in enum member initializers, added tests 2014-10-26 16:40:02 -07:00
Jason Freeman
431bf9a746 Update baselines 2014-10-24 16:42:22 -07:00
Jason Freeman
bfb63df568 Merge branch 'master' into overloadResolution
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2014-10-24 16:36:42 -07:00
Jason Freeman
9865e09fb7 Report type argument inference errors on specific candidates 2014-10-24 13:51:19 -07:00
Mohamed Hegazy
51e101c55e Merge branch 'master' into letAndConst 2014-10-24 10:32:21 -07:00
Mohamed Hegazy
67c78a2662 Only check for collisions with variabels and not properties 2014-10-24 10:30:40 -07:00
Mohamed Hegazy
e4a20849bb Ensure let and const declarations in labels are parsed correctelly 2014-10-24 10:14:36 -07:00
Daniel Rosenwasser
799609c8e8 Tests for tagged templates. 2014-10-23 17:31:12 -07:00
Daniel Rosenwasser
0d1a46d68c Better test coverage for templates in object literals.
These tests still need to be fixed.
2014-10-23 16:55:35 -07:00
Daniel Rosenwasser
e7096280b4 Added support for tagged template strings, updated baselines.
Still need to implement some error recovery and add tests.
2014-10-23 16:54:11 -07:00
Daniel Rosenwasser
b704f19502 Merge branch 'letAndConst' into templates
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2014-10-23 16:03:53 -07:00
Sheetal Nandi
4058518bdb Merge pull request #931 from Microsoft/newTreeBreakPoints
New tree break points
2014-10-23 15:30:45 -07:00
Daniel Rosenwasser
c0893e153f Added tests and baselines for templates. 2014-10-23 15:06:05 -07:00
Mohamed Hegazy
9353c11382 Merge branch 'master' into letAndConst
Conflicts:
	src/compiler/types.ts
2014-10-23 15:01:07 -07:00
Jason Freeman
25171857c5 Add test for bug #807 2014-10-23 12:27:34 -07:00
Sheetal Nandi
eebc8f903d Added another test case (#948) 2014-10-23 10:20:33 -07:00
Anders Hejlsberg
5505371c5a Accepting new baselines 2014-10-22 16:58:13 -07:00
Jason Freeman
47bded060e Specify error message for type argument inference failing 2014-10-22 15:08:18 -07:00
Jason Freeman
e8d5fdc286 Revert the stuffing of instantiated signatures back into the candidates array 2014-10-22 15:08:16 -07:00
Jason Freeman
44f1ab07bf Give different errors for different overload resolution issues 2014-10-22 15:08:14 -07:00
Sheetal Nandi
2e36faed28 Fix the crash in declaration file emit when alias is used before its declaration
Fixes #938
2014-10-22 10:23:15 -07:00
Sheetal Nandi
e87f18cc63 Exported variables can have breakpoint even if they do not have initializer 2014-10-21 18:09:05 -07:00
Sheetal Nandi
e464a3d6fb Span on whole method/accessors if they are of class declaration 2014-10-21 14:19:41 -07:00
Sheetal Nandi
897f23a5dc Span on whole function if the function is exported 2014-10-21 14:02:47 -07:00
Sheetal Nandi
84016da726 Breakpoint span on class and its name is set on whole declaration 2014-10-21 13:17:44 -07:00
Sheetal Nandi
b72b3ac850 Breakpoint span on module and its name is set on whole declaration if it is instantiated 2014-10-21 12:55:46 -07:00
Sheetal Nandi
7a500fbf5e Set breakpoint on whole enum declaration if set on the enum name of enum keyword 2014-10-21 11:33:21 -07:00
Sheetal Nandi
933680b242 Breakpoint validation in interfaces 2014-10-21 10:25:55 -07:00
Sheetal Nandi
308670c9ce Implement getNameOrDottedNameSpan for new compiler 2014-10-20 23:34:43 -07:00
Sheetal Nandi
4a8a8920a2 Do not set breakpoints on the blank line or comment only line 2014-10-20 23:05:53 -07:00
Sheetal Nandi
0cb2e983aa Breakpoints in expressions 2014-10-20 23:05:44 -07:00
Sheetal Nandi
330065fdeb Breakpoints in classes 2014-10-20 23:05:35 -07:00
Sheetal Nandi
b54d20d52b Breakpoints in module declaration 2014-10-20 23:05:26 -07:00
Sheetal Nandi
01d4ce25e2 Breakpoints in enum declaration 2014-10-20 23:05:18 -07:00
Sheetal Nandi
d235caf990 Breakpoints in import declaration 2014-10-20 23:05:09 -07:00
Sheetal Nandi
2905217d4e Breakpoint validation for export assignment 2014-10-20 23:05:01 -07:00
Sheetal Nandi
3663550d89 Breakpoint spans in try,catch,finally blocks and throw statement 2014-10-20 23:04:52 -07:00
Sheetal Nandi
5bdeaa9e6d Breakpoints in the switch statement 2014-10-20 23:04:44 -07:00
Sheetal Nandi
f5731f3e58 Breakpoints in the for in statement 2014-10-20 23:04:35 -07:00
Sheetal Nandi
b97f87624e Breakpoints in for statement 2014-10-20 23:04:27 -07:00
Sheetal Nandi
c81c0bfdce Breakpoints in break/continue statements 2014-10-20 23:04:19 -07:00
Sheetal Nandi
6fbf0d672c Breakpoints in labeled statements 2014-10-20 23:04:10 -07:00
Sheetal Nandi
7425aedd59 Breakpoints for if else construct 2014-10-20 23:04:00 -07:00
Sheetal Nandi
71e96bea9b Breakpoint span in the debugger statement 2014-10-20 23:03:52 -07:00
Sheetal Nandi
a047d205ef Breakpoint span in the doStatement 2014-10-20 23:03:43 -07:00
Sheetal Nandi
abb0acc639 Breakpoints for while statement 2014-10-20 23:03:33 -07:00
Sheetal Nandi
35cdea1a0e Breakpointspan implementation for function declaration, expression statements and return statements 2014-10-20 23:03:24 -07:00
Sheetal Nandi
06d29a00f2 Breakpoint span in variable declarations in new language service
Also updates the fourslash breakpoints baseline to be more readable
2014-10-20 23:02:56 -07:00
Mohamed Hegazy
dd7ca69866 Create a new flag for diagnostics 'isEarly' and disable emit if this flag is set. Set the flag by default on all let and const errors to ensure we are not emitting invalid JS code. 2014-10-20 17:38:50 -07:00
Mohamed Hegazy
d5fe43b53e allow let and const declarations in module bodies under labels 2014-10-20 15:31:33 -07:00
Mohamed Hegazy
dd5c89d5cf Update error messages 2014-10-20 13:48:22 -07:00
Mohamed Hegazy
0e7d8b62ef Merge branch 'master' into letAndConst 2014-10-20 13:34:06 -07:00
Anders Hejlsberg
ff20df7a4a Merge branch 'master' into optionalPropertySubtyping
Conflicts:
	tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.types
2014-10-20 11:33:23 -07:00
Anders Hejlsberg
152a9402d0 Merge pull request #914 from Microsoft/parensInTypes
Parentheses in type literals
2014-10-20 09:43:07 -07:00
Anders Hejlsberg
40d12a0995 Accepting new baselines 2014-10-19 16:44:32 -07:00
Anders Hejlsberg
f3bd294d0e Adding tests 2014-10-19 07:57:10 -07:00
Anders Hejlsberg
e96983dd2b Merge pull request #908 from Microsoft/contextualSignatureUnionTypes
Union types in contextual signature instantiations
2014-10-18 08:47:41 -07:00
Anders Hejlsberg
e5872b4824 Addressing CR feedback 2014-10-18 08:37:33 -07:00
Anders Hejlsberg
df715decbc Changing type-to-string conversions to use parentheses 2014-10-17 16:53:18 -07:00
Mohamed Hegazy
a5a6c6f242 Allow const and let declarations to be exported in modules. Also ensure that const module elements are not used as references. 2014-10-17 15:15:22 -07:00
Anders Hejlsberg
411ca6afab Accepting new baselines 2014-10-17 13:46:41 -07:00
Mohamed Hegazy
fd469d63b1 Fix search for shadowed const declarations by a var declarations to search for any variable instead of only a blockScoped one to ensure we are not picking it up from a wrong scope. 2014-10-17 09:28:42 -07:00
Anders Hejlsberg
c00ee42b11 Adding tests 2014-10-16 20:52:36 -07:00
Mohamed Hegazy
e15f4e6d34 Merge branch 'master' into letAndConst
Conflicts:
	src/compiler/types.ts
2014-10-16 09:30:58 -07:00
Daniel Rosenwasser
73d575e317 Merge branch 'master' into numbersAreHard
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt
	tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt
2014-10-15 17:07:22 -07:00
Mohamed Hegazy
61549239d8 Fix emitting for const in for loops 2014-10-15 09:20:46 -07:00
Mohamed Hegazy
03a100d039 Do not allow let and const declarations to be exported from a module 2014-10-15 09:15:00 -07:00
Mohamed Hegazy
3e4560147b Allow const in for statements 2014-10-14 17:37:46 -07:00
Mohamed Hegazy
82f5fb4055 Flag const declarations shodowed by var redeclarations 2014-10-14 17:15:11 -07:00
Mohamed Hegazy
f5c2740093 Flag assignments to a const 2014-10-14 16:52:12 -07:00
Mohamed Hegazy
cffc62aa1b Report duplicate identifier errors on all locations for merged declarations to align with local declarations 2014-10-14 15:18:44 -07:00
Mohamed Hegazy
318575ce75 Ensure duplicate let/const declarations accross files are reported 2014-10-14 14:51:28 -07:00
Mohamed Hegazy
1dde985f1d Do not allow use of block-scoped variable before its definition 2014-10-13 22:19:19 -07:00
Mohamed Hegazy
cf89f5cf58 Add binder support for block scoped variable declarations 2014-10-13 20:54:26 -07:00