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
Anders Hejlsberg
fc842b177e
Merge branch 'master' into unionTypes
...
Conflicts:
src/compiler/checker.ts
src/compiler/types.ts
src/services/services.ts
tests/baselines/reference/assignmentCompatBetweenTupleAndArray.errors.txt
tests/baselines/reference/bestCommonTypeOfTuple.types
tests/baselines/reference/bestCommonTypeOfTuple2.types
tests/baselines/reference/castingTuple.errors.txt
tests/baselines/reference/contextualTypeWithTuple.errors.txt
tests/baselines/reference/genericCallWithTupleType.errors.txt
tests/baselines/reference/indexerWithTuple.types
tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt
2014-10-13 12:37:34 -07:00
Anders Hejlsberg
a76a418814
Accepting new baselines
2014-10-13 06:56:58 -07:00
Mohamed Hegazy
6f6f4afeb1
Fix line endings
2014-10-12 21:44:29 -07:00
Mohamed Hegazy
979d45eb67
Disallow let and const declarations outside blocks
2014-10-12 21:43:09 -07:00
Mohamed Hegazy
778f101dea
Add basic parsing support for let and const
2014-10-12 21:10:04 -07:00
Mohamed Hegazy
873c1df74b
Add es6 target
2014-10-11 12:52:42 -07:00
Anders Hejlsberg
c9a42c19ab
Accepting new baselines
2014-10-10 17:01:28 -07:00
Mohamed Hegazy
bdac6ca895
Merge pull request #841 from chrisbubernak/disallowNumericEnumMembers
...
Fix for issue #134 (Disallow numeric enum members)
2014-10-10 16:24:12 -07:00
Dan Quirk
8ce1760d9e
Fixing merge conflicts
2014-10-10 14:49:35 -07:00
Dan Quirk
bacb9d0b22
Test updates from union changes
2014-10-10 14:41:14 -07:00
Cyrus Najmabadi
d003561464
Fix newlines in tests
2014-10-10 14:23:12 -07:00
Daniel Rosenwasser
9f32f64a48
Make things more conformant with 9.8.1 of EC-262 spec.
...
Specifically, a numeric property is simply now any property whose name N is equal to ToString(ToNumber(N)).
2014-10-10 14:12:21 -07:00
Daniel Rosenwasser
291982007a
Merge branch 'master' into numbersAreHard
...
Conflicts:
tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt
2014-10-09 14:38:19 -07:00
Yui T
00c30a3ed7
Merge branch 'master' into fixThrowExceptionOnEmitFile
2014-10-09 14:36:48 -07:00
Daniel Rosenwasser
13b5fe0573
Ensure that numeric names are in their printed form.
2014-10-09 12:50:01 -07:00
Yui T
6cb7ffb725
Add baseline
2014-10-09 10:34:22 -07:00
ChrisBubernak
2b4f48996e
Moved the error check from parser to checker & updated baselines
2014-10-09 08:52:53 -07:00
ChrisBubernak
3d6dc58f85
Merge branch 'disallowNumericEnumMembers' of https://github.com/chrisbubernak/TypeScript into disallowNumericEnumMembers
2014-10-09 08:09:11 -07:00
Daniel Rosenwasser
5a49bb610a
Handle numeric signs in 'isNumericName'.
...
To be fair, I don't think humanity knew about negative numbers until like 200 B.C.E.
2014-10-09 00:39:20 -07:00
Sheetal Nandi
58cfc985b9
Merge branch 'master' into symbolInfoFormatting
2014-10-08 18:25:42 -07:00
Yui T
67eff65e03
Add more test cases
2014-10-08 18:15:07 -07:00
Chris Bubernak
16f91b1ef3
fixed error message and updated necessary baselines
2014-10-08 17:23:16 -07:00
Daniel Rosenwasser
92a2c7ff3c
Use our own scanner for 'isNumericName'.
2014-10-08 17:12:36 -07:00
Anders Hejlsberg
5c661baddc
Accepting new baselines after merge with master
...
The tuple type tests from master need to be updated to reflect the new
best common type behavior from union types. This commit simply accepts
the baselines as they are.
2014-10-08 15:37:01 -07:00
Anders Hejlsberg
ea4cbbee4e
Merge branch 'master' into unionTypes
2014-10-08 15:23:37 -07:00
Yui T
40f6b6719f
Add baseline
2014-10-08 15:05:58 -07:00
Anders Hejlsberg
fd5b80805e
Accepting new baselines
...
The new baselines all look correct to me, but obviously a number of the
tests need to be updated to reflect union types and the new behavior of
best common type. This commit does not cover that.
2014-10-08 13:48:44 -07:00
Sheetal Nandi
966e697f2a
Compiler test case for usage of contextual rest parameter
2014-10-08 12:31:03 -07:00
ChrisBubernak
15c5c77704
Fixing tests and baselines
2014-10-08 11:11:36 -07:00
Yui T
530a5c0650
Merge branch 'master' into getEmitOutputExternalModule
2014-10-07 13:21:19 -07:00
Chris Bubernak
8286b67c09
Fixed another bug in parser & fixed up baselines
2014-10-06 22:27:22 -07:00
Yui T
747ae1b1f5
Add fourslash tests to cover external module case
2014-10-06 18:37:01 -07:00
Sheetal Nandi
2de4ad0335
Merge pull request #818 from Microsoft/sourceMapRelativeDirName
...
Fixes incorrect path resolution of sources to sourcemap when the directory paths differ in only case
2014-10-06 11:48:10 -07:00
Sheetal Nandi
4cf78744e3
Added test cases for --outDir option
2014-10-06 11:37:08 -07:00
Yui T
0ef3cd1b22
Merge branch 'master' into tupleConformance
2014-10-06 10:39:12 -07:00
Mohamed Hegazy
432fff1362
Merge pull request #823 from chrisbubernak/betterErrorsForBitwiseOperatorsOnBooleans
...
Fix for issue #712
2014-10-05 09:51:11 -07:00
Chris Bubernak
6044e3aea3
Made fixes based on CR feedback
2014-10-04 10:10:55 -07:00
Chris Bubernak
e6b5591ae9
Updated baselines
2014-10-03 18:50:48 -07:00
Daniel Rosenwasser
c1d15c792b
Merge branch 'master' into navbar
...
Also fixed getSourceText and renamed it to getTextOfNode
2014-10-03 17:44:52 -07:00
Yui T
52f8ae3eec
Tuple conformance
2014-10-03 17:37:29 -07:00
Sheetal Nandi
61994a7e62
Show the type information in places where there is no symbol associated
2014-10-03 15:50:38 -07:00
Sheetal Nandi
710bac6d81
Fix the source map directory resolution with non case sensitive file names
2014-10-03 15:10:12 -07:00
Sheetal Nandi
fe8f736207
Enable tests for the case sensitive and non case sensitive path resolution during soucemap path calculation
2014-10-03 15:07:18 -07:00
Yui T
5926a03363
Merge branch 'master' into flagAllDuplication
2014-10-01 14:27:41 -07:00
Mohamed Hegazy
a37106d4da
Merge pull request #748 from chrisbubernak/selfReferencingFileError
...
Fix issue #568 (no error for file self reference)
2014-10-01 13:44:47 -07:00
Yui T
296e8e01b3
Update Baselines
2014-10-01 11:27:20 -07:00
Yui T
c2d86711e8
Update baselines
2014-09-30 18:09:55 -07:00
Sheetal Nandi
0dbd303084
Fix the quick info on error types
2014-09-30 17:14:58 -07:00
Jason Freeman
ab3326f7b7
Fix arity checking for partial overload resolution
2014-09-30 17:13:47 -07:00
Daniel Rosenwasser
5851752e32
Merge branch 'master' into navbar
...
Conflicts:
Jakefile
src/services/getScriptLexicalStructureWalker.ts
src/services/services.ts
2014-09-30 14:20:58 -07:00
ChrisBubernak
1b3da908de
fixing baseline
2014-09-26 09:33:06 -07:00
ChrisBubernak
93db897778
Fixed some of the baselines, made file comparisons handle different
...
casing, put diagnostic message in correct order
2014-09-26 07:47:44 -07:00
ChrisBubernak
e11ee0f6cf
Fixed a few of the code review suggestions
2014-09-25 13:02:37 -07:00
ChrisBubernak
ae17c35728
Added error checking for references that reference the same file along
...
with 3 tests,
2014-09-25 09:12:31 -07:00
Vladimir Matveev
dae98be062
Merge pull request #737 from Microsoft/instanceof_cascading_errors
...
do not report cascading errors in instanceof operator
2014-09-24 11:09:21 -07:00
Jason Freeman
7bd7d4605e
Merge pull request #726 from Microsoft/sigHelp
...
Signature help in the new compiler
2014-09-24 10:58:50 -07:00
Jason Freeman
22e989795d
Merge branch 'master' into sigHelp
...
Conflicts:
src/compiler/checker.ts
src/compiler/types.ts
src/services/services.ts
2014-09-24 10:47:41 -07:00
Daniel Rosenwasser
3457d87aea
Merge branch 'master' into navbar
...
Conflicts:
src/services/services.ts
2014-09-24 10:40:59 -07:00
Vladimir Matveev
649f5c01a4
do not report cascading errors in instanceof operator
2014-09-24 09:10:40 -07:00
Vladimir Matveev
ef6a87cdfb
use operator token when checking unary expressions in strict mode
2014-09-24 08:52:02 -07:00
Jason Freeman
de2ac51924
Change NodeArray to have a hasTrailingComma property instead of an OmittedExpression
2014-09-23 19:40:25 -07:00
Mohamed Hegazy
12572576c8
fix comment text
2014-09-23 13:44:39 -07:00
Mohamed Hegazy
a6fdad1e97
Added protected conformance tests
2014-09-23 11:22:38 -07:00
Mohamed Hegazy
95394220b4
Merge branch 'release-1.1'
...
Conflicts:
Jakefile
src/compiler/tsc.ts
2014-09-22 14:55:28 -07:00
Cyrus Najmabadi
0282b51c68
Updated test baselines.
2014-09-19 17:58:41 -07:00
Cyrus Najmabadi
4aa7c6693c
Updating baselines.
2014-09-19 17:58:16 -07:00
Cyrus Najmabadi
e426c83017
Merge branch 'master' into fidelityParser
2014-09-19 17:53:07 -07:00
Anders Hejlsberg
7cc6bbb4d1
Merge pull request #688 from Microsoft/protectedMembers
...
Support for protected members in classes
2014-09-19 14:43:53 -07:00
Anders Hejlsberg
b5b0777ad5
More tests for protected members
2014-09-19 14:01:07 -07:00
Mohamed Hegazy
68687395b8
handle cases where we have a node with width 0 when reporting grammar errors
2014-09-19 09:44:47 -07:00
Anders Hejlsberg
ddfe28db66
Accepting new baselines
2014-09-19 06:37:55 -07:00
Cyrus Najmabadi
0e9134788a
Port fidelity changes to github.
2014-09-18 15:37:16 -07:00
Daniel Rosenwasser
fc344eeef9
Merge branch 'master' into navbar
...
Conflicts:
tests/baselines/reference/parserEqualsGreaterThanAfterFunction1.errors.txt
tests/baselines/reference/parserEqualsGreaterThanAfterFunction2.errors.txt
2014-09-18 15:24:52 -07:00
Anders Hejlsberg
08188b0142
Merge branch 'master' into protectedMembers
2014-09-17 17:05:45 -07:00
Daniel Rosenwasser
e69b9e6362
Fixed issue where parser improperly parses a function declaration with no identifier.
2014-09-17 16:20:19 -07:00
Mohamed Hegazy
deaa58b1a0
Merge branch 'master' into completionFixes
...
Conflicts:
tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt
tests/baselines/reference/enumMemberResolution.errors.txt
2014-09-17 14:44:17 -07:00
Jason Freeman
b1f243d814
Merge branch 'release-1.1'
...
Conflicts:
src/harness/harness.ts
tests/baselines/reference/typeName1.errors.txt
2014-09-17 14:10:47 -07:00
Jason Freeman
31eae88b86
Switch to createCompilerDiagnostic for an invalid root file
2014-09-17 10:44:03 -07:00
Anders Hejlsberg
ce6b6234ef
Support for protected members in classes
2014-09-17 10:36:32 -07:00
Yui T
9ee63fa21d
Merge branch 'master' into getEmitOutput
...
Conflicts:
src/services/services.ts
2014-09-16 17:40:38 -07:00
Yui T
e75a1e3694
Change getEmitOutputBaseline
2014-09-16 15:19:41 -07:00
Mohamed Hegazy
5d577df69e
Add better error recovery logic for cases with line ending with "id." followed by a declaration e.g. "class id"
2014-09-15 13:55:39 -07:00
Jason Freeman
50b0516df0
Fix test baseline
2014-09-15 11:14:33 -07:00
Anders Hejlsberg
b4cddc3903
Merge branch 'master' into tupleTypes
2014-09-15 11:04:58 -07:00
Jason Freeman
cb38c9569a
Add a test to make sure types are being checked for privates
2014-09-15 10:54:44 -07:00
Jason Freeman
ba574725c2
Check that private properties originate in the same declaration
2014-09-15 10:54:42 -07:00
Daniel Rosenwasser
1eb924f2d6
Adding baseline that was missed from previous merge.
2014-09-12 14:51:16 -07:00
Daniel Rosenwasser
325cdeff65
Merge pull request #668 from Microsoft/harnessMessageConsistency2
...
Changed Harness Output
2014-09-12 14:41:46 -07:00
Daniel Rosenwasser
9f7782d392
Added error 'prologue' to each error baseline.
2014-09-12 13:35:07 -07:00
Yui T
13cf339fdd
Add getEmitOutput baselines
2014-09-12 13:20:10 -07:00
Anders Hejlsberg
b805037cf2
Improved error messages
2014-09-12 10:23:31 -07:00
Anders Hejlsberg
74536cc6ed
Report circular type inference errors with -noImplicitAny
2014-09-12 07:28:49 -07:00
Daniel Rosenwasser
ee86f8b711
Harness now prints category and code when running tests.
2014-09-11 16:11:08 -07:00
Daniel Rosenwasser
96e5bd26c3
Fixed bug where function type literals may omit their '=>'.
2014-09-11 16:04:07 -07:00
Daniel Rosenwasser
f3f3994f25
Added tests.
2014-09-11 14:52:14 -07:00
Anders Hejlsberg
b61c722eec
Merge pull request #649 from Microsoft/propertyAssignmentWidening
...
Fix widening in object literal property assignments
2014-09-11 13:10:08 -07:00
Jason Freeman
fad5650be6
Fix the error spans issue
2014-09-10 17:57:51 -07:00
Anders Hejlsberg
3d92adec7b
Fix widening in object literal property assignments
2014-09-10 12:58:30 -07:00
Anders Hejlsberg
bf084f159d
Merge pull request #640 from Microsoft/contextualSignatureInstantiation
...
Fix contextual signature instantiation during type inference
2014-09-09 18:46:42 -07:00
Sheetal Nandi
163674d07c
Merge pull request #638 from Microsoft/qualificationOfMethods
...
Fix the condition for qualifying the symbol of methods and functions in the enclosing declaration
2014-09-09 16:21:41 -07:00