Anders Hejlsberg
bbe51cfafe
Adding tests
2015-02-04 15:39:57 -08:00
Daniel Rosenwasser
657d465398
Added ES5 tests for computed properties.
2015-02-03 17:43:31 -08:00
Daniel Rosenwasser
f416cb01c1
Explicitly specify ES6 target in computed property test file names.
2015-02-03 15:28:12 -08:00
Yui T
122d5870f1
Merge branch 'master' into emitArrowFunctionES6
2015-02-02 11:12:45 -08:00
Anders Hejlsberg
34ed45df8e
Adding more tests
2015-02-02 10:26:31 -08:00
Anders Hejlsberg
005676005f
Adding test
2015-01-30 14:14:22 -08:00
Yui T
e4b206c4a2
Merge branch 'master' into emitArrowFunctionES6
2015-01-29 15:37:45 -08:00
Yui T
d5b953d3f6
Add testcases
2015-01-28 16:17:13 -08:00
Daniel Rosenwasser
e4d3051532
Added Jason's example for contextually typing parameters.
2015-01-27 22:39:48 -08:00
Daniel Rosenwasser
26929ee5f2
Merge pull request #1816 from Microsoft/typeArgsInSuperCall
...
Contextually type parameters in super calls using type arguments on the base class.
2015-01-27 17:29:48 -08:00
Yui T
15b05e632d
Merge branch 'master' into emitArrowFunctionES6
2015-01-27 13:40:19 -08:00
Anders Hejlsberg
9289cfb0b0
Merge pull request #1803 from Microsoft/enumUnionTypeGuard
...
Fixes to union types in type guards and instanceof
2015-01-27 06:52:03 -08:00
Yui T
f219a2de25
Address code review; preserve users non-parenthesis
2015-01-26 19:00:38 -08:00
Daniel Rosenwasser
93dbcf006f
Contextually type parameters in super calls using type arguments on the base class.
2015-01-26 18:42:17 -08:00
Anders Hejlsberg
0410394de0
Modifying test
2015-01-25 16:25:38 -08:00
Anders Hejlsberg
7f63180b64
Adding tests
2015-01-24 17:23:22 -08:00
Jason Freeman
9c9434b80f
Merge branch 'master' into computedProperties
...
Conflicts:
tests/baselines/reference/intTypeCheck.errors.txt
2015-01-23 11:45:53 -08:00
Anders Hejlsberg
ccffc9f25f
Adding more tests
2015-01-22 15:12:55 -08:00
Anders Hejlsberg
963de957cb
Adding regression test
2015-01-22 14:52:15 -08:00
Jason Freeman
f7a8ba28ff
Use isTypeOfKind in computed property checks
2015-01-21 17:01:42 -08:00
Jason Freeman
eeb4dc447b
Merge branch 'master' into computedProperties
2015-01-21 15:51:31 -08:00
Anders Hejlsberg
f34620db63
Modifying and adding tests
2015-01-21 13:55:07 -08:00
Jason Freeman
de5aa6c0d2
Fix source map scope name for computed properties
2015-01-21 11:01:05 -08:00
Yui T
581beb58dc
Merge branch 'master' into emitArrowFunctionES6
2015-01-21 10:36:32 -08:00
Jason Freeman
eb7798fbb2
Skip computed properties on declaration emit
2015-01-20 18:29:04 -08:00
Jason Freeman
85219ee5e1
Check computed properties against indexers in classes
2015-01-20 17:07:55 -08:00
Jason Freeman
89f36bb9c5
Disallow computed properties referencing type parameters from containing type
2015-01-19 18:44:15 -08:00
Jason Freeman
b5349a5038
Disallow super and fix this capturing for computed properties
2015-01-19 16:37:17 -08:00
Jason Freeman
4cc2722700
Disallow this in computed properties in classes
2015-01-19 16:37:10 -08:00
Jason Freeman
1973b42946
Indexers in object literals include computed property types
2015-01-19 16:37:03 -08:00
Jason Freeman
1b35a1be25
Contextual typing for computed properties
2015-01-19 16:37:00 -08:00
Jason Freeman
96b5f1fe43
Add tests for classes, methods, accessors with computed properties
2015-01-19 16:36:53 -08:00
Jason Freeman
de3eb36b2c
Update baselines
2015-01-19 16:36:50 -08:00
Jason Freeman
4ac2b4b9c8
Add tests for object literals with computed properties
2015-01-19 16:36:43 -08:00
Daniel Rosenwasser
5bcb52f9b0
Merge pull request #1676 from Microsoft/disallowOptionalBindingParameters
...
Disallow optional destructured parameters in implementation signatures.
2015-01-15 16:55:14 -08:00
Yui T
6d678b7d4f
Merge branch 'master' into addTestsForRestAndDefault
2015-01-15 13:57:25 -08:00
Daniel Rosenwasser
8dd81ea4fc
Merge pull request #1673 from Microsoft/unDestructuringParameterProperties
...
Disallow destructured parameter properties
2015-01-15 13:39:47 -08:00
Daniel Rosenwasser
dafe7c8958
Added tests.
2015-01-14 17:02:31 -08:00
Daniel Rosenwasser
61e2eb6b89
Renamed tests.
2015-01-14 16:13:12 -08:00
Daniel Rosenwasser
f58e6fc4a1
Fixed incorrect tests.
2015-01-14 16:08:29 -08:00
Daniel Rosenwasser
bfe63cc4cb
Merge pull request #1648 from Microsoft/contextualTypeParenthesizedExpressions
...
Contextually type parenthesized expressions
2015-01-14 14:52:07 -08:00
Yui T
fdadd3c18e
Fix narrow type for instanceOf and add testcases
2015-01-14 11:30:58 -08:00
Daniel Rosenwasser
b434ee42a8
Added tests.
2015-01-13 16:06:34 -08:00
Anders Hejlsberg
59e266de02
Improved handing of union types in type guards
2015-01-12 14:51:20 -08:00
Yui T
cb48a5e110
Add testcases
2015-01-09 16:16:39 -08:00
Daniel Rosenwasser
cd246992ed
Clarified comment in test.
2015-01-09 14:19:24 -08:00
Daniel Rosenwasser
f5f4e28f4f
Fixed portion of test.
2015-01-08 16:53:26 -08:00
Daniel Rosenwasser
d5f02813f0
Added tests for contextual typing on parenthesized expressions, added case for tagged templates.
2015-01-08 16:39:47 -08:00
Anders Hejlsberg
40dc1341ab
Merge pull request #1621 from Microsoft/narrowingOfAny
...
Type guard narrows type any in a primitive type check
2015-01-08 15:57:15 -08:00
Anders Hejlsberg
968a56924f
Type guard narrows type any in a primitive type check
2015-01-08 14:27:39 -08:00
Arnavion
d07151f87c
Update tests and baselines.
2015-01-06 15:28:06 -08:00
Arnavion
4dfb0cc3d8
Update tests and baselines.
2015-01-06 02:42:22 -08:00
Jason Freeman
7459c87265
Merge branch 'release-1.4'
...
Conflicts:
bin/lib.core.es6.d.ts
bin/lib.es6.d.ts
bin/tsc.js
bin/typescript.d.ts
bin/typescriptServices.d.ts
bin/typescriptServices.js
bin/typescriptServices_internal.d.ts
bin/typescript_internal.d.ts
2015-01-05 15:08:17 -08:00
Yui T
ec5c115cfa
Add tests covering emitting rest parameters natively in ES6
2015-01-05 13:33:44 -08:00
Yui T
22bf60e431
Add tests covering emitting default parameters natively in ES6
2015-01-05 13:22:43 -08:00
Anders Hejlsberg
766756b4b1
Merge branch 'master' into spreadAndRest
...
Conflicts:
src/compiler/parser.ts
2014-12-17 11:49:45 -08:00
Yui T
9ab59a4964
Merge branch 'master' into refactorGrammarCheck
...
Conflicts:
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
src/compiler/parser.ts
src/compiler/types.ts
tests/baselines/reference/YieldExpression8_es6.errors.txt
tests/baselines/reference/ambientErrors.errors.txt
tests/baselines/reference/giant.errors.txt
2014-12-16 17:38:40 -08:00
Daniel Rosenwasser
1f6cd941fd
Changed tests to error when actual contextual typing is broken.
2014-12-15 17:09:56 -08:00
Daniel Rosenwasser
17c822966d
Added tests for erroneous function expressions in both tagged/untagged template expressions.
2014-12-15 16:39:12 -08:00
Daniel Rosenwasser
0263d60071
Split contextual typing test for substitution expressions into two tests.
2014-12-15 16:14:35 -08:00
Daniel Rosenwasser
b65a422c7a
Fixed contextual typing for tagged template expressions.
2014-12-15 14:11:21 -08:00
Yui T
1cc0d184bb
Move grammar checking: shorthandPropertyAssignment; Add more parser test; there are still errors from incomplete migration
2014-12-14 19:14:02 -08:00
Anders Hejlsberg
3e436c5047
Adding new tests
2014-12-12 14:34:12 -08:00
Anders Hejlsberg
b416cbc599
Merge branch 'master' into spreadAndRest
...
Conflicts:
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
src/compiler/parser.ts
2014-12-12 14:32:53 -08:00
Anders Hejlsberg
86a9c80ff8
Adding tests and accepting new baselines
2014-12-12 10:56:22 -08:00
Daniel Rosenwasser
9ad6eb21ed
Merge pull request #1341 from Microsoft/escapingTheTemplateOfDoom
...
Template string escaping fixes
2014-12-10 16:29:00 -08:00
Anders Hejlsberg
35adeb8363
Addressing CR feedback
2014-12-10 14:44:31 -08:00
Anders Hejlsberg
98c9f75e21
Adding test case
2014-12-10 14:41:37 -08:00
Anders Hejlsberg
2876ba6a6c
Addressing CR feedback
2014-12-10 14:25:02 -08:00
Anders Hejlsberg
37b5c74b93
Adding test case
2014-12-10 10:17:48 -08:00
Anders Hejlsberg
7bc35b3ae0
Merge branch 'master' into destructuring
...
Conflicts:
src/compiler/binder.ts
src/compiler/checker.ts
src/compiler/emitter.ts
src/compiler/parser.ts
src/services/services.ts
tests/baselines/reference/parserCommaInTypeMemberList2.errors.txt
2014-12-09 11:26:43 -08:00
Yui T
c1d509a940
Update and add test cases
2014-12-08 15:47:24 -08:00
Anders Hejlsberg
816abb19e4
Merge branch 'master' into destructuring
...
Conflicts:
src/compiler/checker.ts
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
src/compiler/emitter.ts
src/compiler/parser.ts
src/compiler/types.ts
src/services/navigationBar.ts
tests/baselines/reference/assignmentLHSIsValue.errors.txt
tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
tests/baselines/reference/parserErrorRecovery_ParameterList2.errors.txt
2014-12-03 16:43:01 -08:00
Anders Hejlsberg
65d1510769
Adding rudimentary tests
2014-12-02 16:23:37 -08:00
Daniel Rosenwasser
4c4e5a43e0
Added multiline tests.
2014-12-02 13:54:10 -08:00
Sheetal Nandi
802f11349f
Merge pull request #1056 from Microsoft/unionTypeConformance
...
Union type conformance
2014-12-02 08:02:34 -08:00
Daniel Rosenwasser
ddb3ca0f48
Augment escapeString to fix downlevel template literal emit.
2014-12-01 17:27:11 -08:00
Daniel Rosenwasser
9da7287eaa
Merge pull request #1275 from Microsoft/unterminator
...
Keep track of unterminated literal expressions.
2014-12-01 12:57:33 -08:00
Yui T
7ec49fd80e
Merge branch 'master' into binaryIntegerLiteral
...
Conflicts:
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
src/compiler/emitter.ts
tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
2014-12-01 11:22:37 -08:00
Yui T
db51fbd65c
Add check and testcases for invalid binary digits and octal digits
2014-11-29 17:03:38 -08:00
Cyrus Najmabadi
29ced53a4d
Add parser tests for let/const.
2014-11-28 14:50:58 -08:00
Jason Freeman
1a8816f459
Address feedback
2014-11-26 20:10:49 -08:00
Daniel Rosenwasser
ae384470a4
Tests for terminated/unterminated template strings.
2014-11-26 17:14:08 -08:00
Jason Freeman
f6266fc99e
Checker refactor for FunctionLike and VariableOrProperty
2014-11-25 16:09:05 -08:00
Jason Freeman
2bc1f4f4fa
Update error codes
2014-11-25 16:09:03 -08:00
Jason Freeman
0e864143de
Emit tests for computed properties
2014-11-25 16:08:58 -08:00
Jason Freeman
cf4f34c224
Add parser tests for computed properties
2014-11-25 16:08:53 -08:00
Daniel Rosenwasser
c8bb487645
Merge branch 'master' into conformanceTests-624
...
Conflicts:
tests/baselines/reference/parameterInitializersForwardReferencing.errors.txt
2014-11-25 14:18:17 -08:00
Cyrus Najmabadi
3b253e9a4a
Add an _es6 suffix to prevent name collisions.
2014-11-24 22:53:55 -08:00
Cyrus Najmabadi
78cd1b5f7e
Parser tests for generators and yield expressions.
2014-11-24 22:40:54 -08:00
Yui T
169bc219f2
Merge branch 'binaryIntegerLiteral' of https://github.com/Microsoft/TypeScript into binaryIntegerLiteral
2014-11-24 18:38:03 -08:00
Yui T
5774e64d92
Add test cases
2014-11-23 18:05:21 -08:00
Sheetal Nandi
ab4ccb3a1c
Merge branch 'master' into unionTypeConformance
2014-11-21 01:33:13 -08:00
Cyrus Najmabadi
6865265b45
Merge branch 'master' into grammarChecks
2014-11-20 13:07:45 -08:00
Daniel Rosenwasser
f51a42c6de
Fixed issue where template expression in call expressions would emit with unnecessary parentheses.
...
Fixes #1205 .
2014-11-19 17:04:34 -08:00
Cyrus Najmabadi
0e6aab7c42
Move object literal checks to the grammar checker.
2014-11-18 21:41:07 -08:00
Cyrus Najmabadi
6fdc5dc148
Move parameter name 'strict' checking to the grammar walker.
2014-11-18 17:01:39 -08:00
Yui T
1b66ee6f3a
Merge branch 'master' into shorthandProperty
...
Conflicts:
src/compiler/checker.ts
2014-11-17 11:35:02 -08: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
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
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
Yui T
bb7a0aa9d9
Add conformance tests
2014-11-11 11:31:45 -08:00
Daniel Rosenwasser
6d353c078c
Merge branch 'master' into taggedTemplates
2014-11-07 16:24:40 -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
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
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
Anders Hejlsberg
b3ef9622a7
Addressing CR feedback
2014-11-03 13:50:41 -08:00
Vladimir Matveev
cba9b7ff5e
fixed typo
2014-11-02 16:20:00 -08:00
Vladimir Matveev
6b1a96ca29
added basic set of tests for type aliases
2014-11-02 13:34:04 -08:00
Anders Hejlsberg
6b61422e07
Adding tests
2014-11-02 11:14:23 -08:00
Vladimir Matveev
fe7d056724
initial version of spec conformance tests for type aliases
2014-11-01 23:54:55 -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
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
Daniel Rosenwasser
799609c8e8
Tests for tagged templates.
2014-10-23 17:31:12 -07:00
Daniel Rosenwasser
a5b77c65f6
Added tests for tagged templates. Some should fail when we do typechecking.
2014-10-23 16:57:17 -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
b704f19502
Merge branch 'letAndConst' into templates
...
Conflicts:
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
2014-10-23 16:03:53 -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
Anders Hejlsberg
10a7e6ba70
Fixing in, for...in, and instanceof with union type operands
2014-10-22 16:57:43 -07:00
Jason Freeman
47bded060e
Specify error message for type argument inference failing
2014-10-22 15:08:18 -07:00
Mohamed Hegazy
0e7d8b62ef
Merge branch 'master' into letAndConst
2014-10-20 13:34:06 -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
f3bd294d0e
Adding tests
2014-10-19 07:57:10 -07:00
Anders Hejlsberg
e5872b4824
Addressing CR feedback
2014-10-18 08:37:33 -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
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
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
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
ChrisBubernak
15c5c77704
Fixing tests and baselines
2014-10-08 11:11:36 -07:00
Chris Bubernak
c77135d3d9
Removed Numeric members from a bunch of tests
...
-in these tests it wasn't really in the spirit of the tests for them to be there
-also removed a test that no longer made sense
2014-10-06 16:14:45 -07:00
Yui T
6dfb60d77c
Remove duplicate file
2014-10-06 10:36:54 -07:00
Yui T
52f8ae3eec
Tuple conformance
2014-10-03 17:37:29 -07:00
Yui T
c2d86711e8
Update baselines
2014-09-30 18:09:55 -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
Cyrus Najmabadi
e426c83017
Merge branch 'master' into fidelityParser
2014-09-19 17:53:07 -07:00
Anders Hejlsberg
b5b0777ad5
More tests for protected members
2014-09-19 14:01:07 -07:00
Cyrus Najmabadi
0e9134788a
Port fidelity changes to github.
2014-09-18 15:37:16 -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
f3f3994f25
Added tests.
2014-09-11 14:52:14 -07:00
Jason Freeman
6fb3c34681
Conformance coverage for spec change #589
2014-09-05 18:44:49 -07:00
Jason Freeman
3388f7bd48
Update baselines
2014-08-27 16:58:31 -07:00
Jason Freeman
aa0ae22b37
Update baselines
2014-08-27 10:06:16 -07:00
Jason Freeman
cc20bb19d0
Baseline and harness changes
2014-08-25 10:55:22 -07:00
Jason Freeman
971a4c55d4
Remove problematic test (should be added back after issue #463 is fixed)
2014-08-15 14:37:38 -07:00
Mohamed Hegazy
349367d991
Consolidate logic to use the lib in one location in the tests
2014-08-11 15:35:15 -07:00
Jason Freeman
b1f71e6504
Address feedback
2014-08-07 12:08:31 -07:00
Jason Freeman
083815893b
Add test for octal literals in es3 strict mode
2014-08-06 18:10:19 -07:00
Jason Freeman
60e7f0850a
Add es5 directive on scanner es5 tests
2014-08-06 18:10:13 -07:00
Daniel Rosenwasser
0939f77d77
Added tests for missing 'try' parsing
2014-07-25 18:25:43 -07:00
Anders Hejlsberg
0550b93635
Allow reserved words in type queries.
...
Fixes #181 .
2014-07-22 15:11:24 -07:00
Daniel Rosenwasser
c777d5c68a
Report error on unclosed multiline comment.
...
Fixes #22
2014-07-15 12:21:16 -07:00
Dan Quirk
4b1ff742dd
Updating some tests for resolved bugs
2014-07-14 16:47:50 -07:00
Mohamed Hegazy
214df64e28
Add snapshot of compiler sources
2014-07-12 17:30:19 -07:00