Commit graph

419 commits

Author SHA1 Message Date
Sheetal Nandi
871507e386 Emit leading and trailing comments for parameter 2014-08-14 05:47:38 -07:00
Sheetal Nandi
3e95358486 Emit comments in the javascript code if --removecomments is not specified 2014-08-14 05:41:04 -07:00
Sheetal Nandi
f622cb4d11 Merge pull request #381 from branch 'remote/privacyErrors'
Report privacy errors on variable/property declarations and also emit import declarations that get used to defined visible type
2014-08-13 18:48:05 -07:00
Anders Hejlsberg
f0b33b345b Accepting new baselines. 2014-08-13 15:45:43 -07:00
Mohamed Hegazy
85b53c74d1 Merge branch 'master' into classifier 2014-08-12 21:43:38 -07:00
Mohamed Hegazy
2a106bf923 Merge pull request #427 from sparecycles/fix/reference-static-regex
fix: /// <reference path="..." static='true' />
2014-08-12 17:46:06 -07:00
Mohamed Hegazy
bc61807d85 Merge pull request #443 from Microsoft/fourslash
Reenable Fourslash tests after they have been accidentlly disabled
2014-08-12 17:45:04 -07:00
Mohamed Hegazy
a8df9c1586 update test 2014-08-12 17:43:15 -07:00
Mohamed Hegazy
c16d0df7b2 Disable test as it needs resolution which the test harness does not support yet 2014-08-12 17:43:02 -07:00
Vladimir Matveev
ccaf904cfa support outlining for arbitrary blocks 2014-08-12 15:47:57 -07:00
Daniel Rosenwasser
90c173dd16 Merge branch 'master' into diagnosticsCleanup 2014-08-12 14:59:01 -07:00
Adam Freidin
785b80ff27 baseline update
jake runtests
jake baseline-accept
2014-08-12 13:57:47 -07:00
Anders Hejlsberg
d3621bf042 Merge pull request #436 from Microsoft/improvedArrayErrors
Rearranging members of Array<T> to improve error reporting.
2014-08-12 13:07:00 -07:00
Vladimir Matveev
551a532f5d Merge pull request #430 from Microsoft/outlining
enable outlining atop of new compiler
2014-08-12 11:59:14 -07:00
Anders Hejlsberg
e0a4b3c1cc Rearranging members of Array<T> to improve error reporting. 2014-08-12 11:13:15 -07:00
Adam Freidin
5e2316d642 added tests for <reference path="" static='' /> 2014-08-11 16:34:31 -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
Anders Hejlsberg
3b1dbadb88 Addressing CR feedback, adding baselines. 2014-08-11 14:52:32 -07:00
Sheetal Nandi
98f631e23f Make changes to report error if the type used from external module cannot be named
Adds test cases too
2014-08-11 14:15:57 -07:00
Vladimir Matveev
785c083888 enable outlining atop of new compiler 2014-08-11 13:15:07 -07:00
Anders Hejlsberg
5b255243c9 Adding support for tuple types (e.g. [number, string]) 2014-08-11 12:21:26 -07:00
Sheetal Nandi
e27e6b2bbb During qualification if we are looking in value space, the left qualifier meaning is also value 2014-08-08 17:07:00 -07:00
Mohamed Hegazy
be47b94c8f clean up tests 2014-08-08 16:45:10 -07:00
Mohamed Hegazy
17c45ed986 revert changes to classify a keyword as an identifier if the last token is keyword 2014-08-08 16:43:31 -07:00
Sheetal Nandi
09ea12d95c Use typeof function in the declaration emitter instead of unwinding first level 2014-08-08 16:15:09 -07:00
Sheetal Nandi
1347621d0c Report error if the entityname reference in the import declaration is using private module 2014-08-08 13:56:53 -07:00
Sheetal Nandi
c643f39557 Check for the accessible symbol from exported import
eg:
// @Filename: w1.ts
export = Widget1
class Widget1 { name = 'one'; }

// @Filename: exporter.ts
export import w = require('./w1');

// @Filename: consumer.ts
import e = require('./exporter');

export function w(): e.w { // Should be OK
    return new e.w();
}

In this looking for the name of return type of function w,
not just look for the alias == SymbolOfReturnType but also
look for alias.exportedSymbols === symbolOfReturnType
and qualify it during the toString
2014-08-08 12:57:59 -07:00
Mohamed Hegazy
a90c62bf8b Merge branch 'master' into tsc 2014-08-08 12:56:46 -07:00
Mohamed Hegazy
ad9a87dfb6 Add some huristic optimization to not colorize a keyword if precceded by a dot or a keyword. this should handel cases for "a.var" or "module string { }" 2014-08-08 10:37:10 -07:00
Mohamed Hegazy
bae6ddd1b5 add unterminated multiline comment classification tests 2014-08-07 23:51:15 -07:00
Mohamed Hegazy
38cacc967f Enable unit tests for DocumentRegistry 2014-08-07 23:45:43 -07:00
Mohamed Hegazy
d502ae20e5 move formatting unit tests to a diffrent folder 2014-08-07 23:45:23 -07:00
Mohamed Hegazy
05d2e75e7c delete unused tests 2014-08-07 23:45:13 -07:00
Mohamed Hegazy
3fcd33ec32 Enable clorizer unit tests 2014-08-07 23:45:03 -07:00
Sheetal Nandi
54f5f15796 Update the project runner to emit errors in more readable way 2014-08-07 17:49:47 -07:00
Sheetal Nandi
2264322380 Enable project runner to compile generated .d.ts files
Uncovered bug in quoted .d.ts compilation
2014-08-07 17:26:29 -07:00
Daniel Rosenwasser
122b78612c Recovered deleted, renumbered existing, reworded some. 2014-08-07 15:59:49 -07:00
Daniel Rosenwasser
0c0d607087 Removed duplicate messages from diagnosticMessages.json. 2014-08-07 15:59:44 -07:00
Sheetal Nandi
5657c28b8b Fix the incorrect declaration file path during d.ts file compile in the compilerrunner 2014-08-07 14:59:00 -07:00
Sheetal Nandi
cac18738df Removing bug numbers from the testcases which are fixed and adding declaration generation in few testcases 2014-08-07 14:47:49 -07:00
Sheetal Nandi
4801c3447f Emit the declarations for the chained import usage in the export assignment 2014-08-07 12:24:28 -07:00
Jason Freeman
92f7c98adb Merge branch 'master' into octal 2014-08-07 12:11:13 -07:00
Jason Freeman
b1f71e6504 Address feedback 2014-08-07 12:08:31 -07:00
Vladimir Matveev
02d0b024c6 Merge pull request #378 from Microsoft/inherited_overloads_with_specialized_signatures
do not reorder signatures from derived and base types
2014-08-07 10:35:47 -07:00
Vladimir Matveev
d99fe9f2b7 adjust perftc to match the most recent implementation of createSourceFile 2014-08-06 23:58:20 -07:00
Vladimir Matveev
cc52e1f428 Handle sys.exit in perftc 2014-08-06 23:53:42 -07:00
Mohamed Hegazy
9d8cee1f72 rename tc.js to tsc.js 2014-08-06 23:21:53 -07:00
Mohamed Hegazy
9e6cacb701 Merge branch 'master' into bom 2014-08-06 22:50:40 -07:00
Vladimir Matveev
702b27b3ca fixed build breaks in perftc 2014-08-06 22:42:35 -07:00
Sheetal Nandi
2654eed32d Report privacy errors for accessors 2014-08-06 18:42:14 -07:00
Jason Freeman
083815893b Add test for octal literals in es3 strict mode 2014-08-06 18:10:19 -07:00
Jason Freeman
72cf78f681 Error on octal literals in ES5 and strict mode 2014-08-06 18:10:16 -07:00
Jason Freeman
60e7f0850a Add es5 directive on scanner es5 tests 2014-08-06 18:10:13 -07:00
Jason Freeman
f744113edf Scan octal literals 2014-08-06 18:10:11 -07:00
Sheetal Nandi
4cd2d3f8dd Report privacy errors on return types 2014-08-06 17:58:03 -07:00
Sheetal Nandi
41150776d1 Report privacy errors on parameter types 2014-08-06 17:06:59 -07:00
Sheetal Nandi
4b12353a78 Test case for the privacy check of variables and properties during declaration emit 2014-08-06 15:17:44 -07:00
Sheetal Nandi
5810bfed6d Ambient module declarations (exception import declaration) are visible 2014-08-06 15:13:06 -07:00
Mohamed Hegazy
3295cdaa19 rename test 2014-08-06 14:33:06 -07:00
Mohamed Hegazy
9222711ace change name of the flag to emitBOM 2014-08-06 14:24:47 -07:00
Vladimir Matveev
236e24b468 do not reorder signatures from derived and base types 2014-08-06 13:39:09 -07:00
Sheetal Nandi
5d21db9ccf Test baselines after asynchronous alias declaration writing 2014-08-06 13:16:41 -07:00
Sheetal Nandi
0b227d5196 Test baselines because of change 2014-08-06 13:12:34 -07:00
Mohamed Hegazy
f125ee20bb Merge branch 'master' into bom
Conflicts:
	src/compiler/commandLineParser.ts
	src/compiler/emitter.ts
2014-08-06 12:55:57 -07:00
Mohamed Hegazy
a4a773a352 make the BOM visible in the test output 2014-08-06 12:36:39 -07:00
Mohamed Hegazy
35c1577ff5 Add tests for generateBOM switch 2014-08-06 12:05:01 -07:00
Sheetal Nandi
5c4009a163 Merge pull request #161 from Microsoft/privacyErrors
Report errors for usage of private types when generating declaration file
2014-08-06 11:51:55 -07:00
Anders Hejlsberg
a2a6b8a410 Support extensionless <reference> comments.
Fixes #344.
2014-08-05 14:32:53 -07:00
Daniel Rosenwasser
40f6ed0b65 Merge pull request #262 from Microsoft/trylessCatchesFinallyParseNicely
Improved errors for 'catch'/'finally' blocks missing 'try' statements
2014-08-04 15:56:20 -07:00
Mohamed Hegazy
ab05b75297 Merge pull request #326 from Microsoft/getDefinition
Wire getDefinitionAtPosition using the new compiler implementation
2014-08-04 15:11:58 -07:00
Vladimir Matveev
017a76bd85 Merge pull request #357 from Microsoft/specialized_signatures
fixed check for call\construct signatures in interfaces
2014-08-04 15:11:44 -07:00
Vladimir Matveev
059b57f417 fixed check for call\construct signatures in interfaces 2014-08-04 14:37:24 -07:00
Mohamed Hegazy
1667894ec6 Merge branch 'master' into getDefinition 2014-08-04 12:52:27 -07:00
Sheetal Nandi
0e76a82072 Fix the incorrect error reporting and declaration file emit for the type parameter constraint of private methods
Also incorporates code review feedback
2014-08-04 12:06:07 -07:00
Anders Hejlsberg
9a5324347e Merge pull request #330 from Microsoft/pullContextualTypes
Pull model for contextual types
2014-08-04 11:51:23 -07:00
Anders Hejlsberg
52ca6071c9 Merge pull request #333 from Microsoft/fixContainerList
Properly build container list in binder.
2014-08-03 15:23:10 -07:00
Mohamed Hegazy
8956c4947c update test to add true and false values 2014-08-01 17:15:25 -07:00
Mohamed Hegazy
e2b02c6bdd Add new go to def test 2014-08-01 17:12:00 -07:00
Mohamed Hegazy
41b7eb25a3 Make goto def jump to labels across function boundries 2014-08-01 17:11:41 -07:00
Anders Hejlsberg
afe3abde5b Adding test output file. 2014-08-01 15:24:02 -07:00
Anders Hejlsberg
cb038467d6 Adding regression test for #325 2014-08-01 15:20:08 -07:00
Mohamed Hegazy
e6f930b53a support goto def on object literal properties 2014-08-01 15:09:12 -07:00
Ryan Cavanaugh
fedbc1cd9e Fix compile errors in fourslash tests 2014-08-01 14:36:18 -07:00
Mohamed Hegazy
205974d453 Add new GotoDefinition tests 2014-08-01 14:29:42 -07:00
Mohamed Hegazy
76bca3a766 Add support for goto def on external module name 2014-08-01 13:07:52 -07:00
Ryan Cavanaugh
acd3ba35cc Remove debugger statements from fourslash tests 2014-08-01 13:05:23 -07:00
Mohamed Hegazy
a303c1eb27 Update getSymbolOfIdentifier to ensure we are gettting the alas symbol in both type and value positions 2014-08-01 12:55:20 -07:00
Vladimir Matveev
c0b3efbbb4 emit this capturing as a first action in the constructor 2014-08-01 11:16:09 -07:00
Mohamed Hegazy
c406662bc4 Wire getDefinitionAtPosition using the new compiler implementation 2014-07-31 19:58:18 -07:00
Mohamed Hegazy
61436368b5 Merge branch 'master' into ls 2014-07-31 18:43:53 -07:00
Anders Hejlsberg
352a44df3f Accepting new baselines.
Previous commit fixes overly aggressive -noImplictAny reporting. In the test case the source
of the error is the 'getAndSet' property that implicitly gets type any. The fact that the setter
then gets type any isn't actually an error.
2014-07-31 15:56:00 -07:00
Daniel Rosenwasser
add65f1f29 Merge branch 'master' into trylessCatchesFinallyParseNicely
Conflicts:
	src/compiler/diagnosticMessages.json
2014-07-31 14:49:14 -07:00
Daniel Rosenwasser
3ba4ad55c0 Merge pull request #320 from Microsoft/slashInCharClass
Fixed error when parsing slashes in RegExp literals.
2014-07-31 14:33:58 -07:00
Vladimir Matveev
fee596b2d5 added test for skipped node case 2014-07-31 12:01:46 -07:00
Vladimir Matveev
ed26563146 Merge pull request #317 from Microsoft/order_of_overloads
Disallow statements between overloads
fixed #75 and #92
2014-07-31 11:37:34 -07:00
Vladimir Matveev
a62b47eace addressed CR feedback: changed error message 2014-07-31 11:06:42 -07:00
Daniel Rosenwasser
35803db2e6 Fixed error when parsing slashes in RegExp literals.
Basically we weren't recognizing that a slash can occur in a character class, so we were bailing out too early on code like `/[/]/`.

Fixes issue #318.
2014-07-31 00:36:50 -07:00
Vladimir Matveev
59b1e46102 disallow statements between overloads 2014-07-30 16:27:13 -07:00
Anders Hejlsberg
8199b0b236 Pull model for contextual types.
New baselines reflect a couple of unrelated bug fixes.
2014-07-29 18:21:16 -07:00
Daniel Rosenwasser
ef5ae6e969 Merge pull request #273 from Microsoft/es3HatesTrailingCommas
No longer emit trailing comma on object literals for ES3.
2014-07-29 16:31:17 -07:00
Daniel Rosenwasser
c5349dc95f Accept object literal commas in ES3, preserve in ES5. 2014-07-29 16:25:10 -07:00
Mohamed Hegazy
990669972a update error positions after rebase 2014-07-29 15:28:25 -07:00
Mohamed Hegazy
648af3801a react to changes after rebase 2014-07-29 12:35:26 -07:00
Mohamed Hegazy
4ad7452a58 Enable passing fourslash tests 2014-07-29 12:17:44 -07:00
Mohamed Hegazy
85393abfd9 enable formatting tests 2014-07-29 12:17:23 -07:00
Mohamed Hegazy
d4ba45cb36 move failing tests to old 2014-07-29 12:17:03 -07:00
Mohamed Hegazy
c6c77ea989 move todoComment tests to old for now 2014-07-29 12:16:53 -07:00
Daniel Rosenwasser
fce3bdd171 Merge pull request #256 from Microsoft/ambientAccessorErrors
Gracefully handle accessor declarations in ambient classes.
2014-07-29 11:46:32 -07:00
Daniel Rosenwasser
fe4c738b01 No longer emit trailing comma on object literals.
This was done because trailing commas in object literals are not accepted by ES3.

Fixes #271.
2014-07-28 11:37:36 -07:00
Vladimir Matveev
df3567c7db Merge pull request #197 from Microsoft/locals_exports
Alternative proposal for grouping exported and local declarations
2014-07-28 11:26:08 -07:00
Anders Hejlsberg
fc0004749f Merge pull request #264 from Microsoft/errorOnHiddenModuleImport
Error when importing shadowed internal module.
2014-07-27 18:09:04 -07:00
Daniel Rosenwasser
79735b4431 Simplified error recovery by just using 'parseTryStatement'. 2014-07-26 21:23:50 -07:00
Anders Hejlsberg
3da5f1ef6f Error when importing shadowed internal module.
Fixes #73.
2014-07-26 08:13:52 -07:00
Daniel Rosenwasser
0939f77d77 Added tests for missing 'try' parsing 2014-07-25 18:25:43 -07:00
Daniel Rosenwasser
efb6db8757 Gracefully handle 'catch' and 'finally' blocks without a preceding 'try' block.
Fixes #216.

As a note of this fix, when a 'catch' block is followed by a 'finally' block, only the 'catch' keyword gets an error reported on it.
2014-07-25 18:10:27 -07:00
Vladimir Matveev
e4256d827d Merge pull request #252 from Microsoft/array_symbol_links
Use symbol links to access global array type
2014-07-25 17:12:14 -07:00
Jason Freeman
9e039f53b5 Merge pull request #259 from Microsoft/canParseSemicolon
Remove isSemicolon
2014-07-25 17:09:08 -07:00
Jason Freeman
478fadfe3d Disallow modifiers on export assignments (fix #164) 2014-07-25 16:39:24 -07:00
Jason Freeman
61731eefdf Remove isSemicolon (fix #200) 2014-07-25 16:17:30 -07:00
Jason Freeman
936863c299 Update error message to be more consistent with others 2014-07-25 14:01:50 -07:00
Daniel Rosenwasser
fc80c300a0 Gracefully handle accessor declarations in ambient classes. 2014-07-25 13:21:55 -07:00
Jason Freeman
b2abab2f93 Improve the error in a 'for in' statement 2014-07-25 12:38:36 -07:00
Vladimir Matveev
442ad4b032 use symbol links to access global array type 2014-07-25 12:06:18 -07:00
Vladimir Matveev
42df260eb5 use getEffectiveDeclarationFlags to get Export flag 2014-07-25 11:15:19 -07:00
Anders Hejlsberg
155b71881b Merging with master.
Accepting new baselines (not sure why this wasn't already done).
2014-07-25 06:48:57 -07:00
Anders Hejlsberg
f991054691 Merge branch 'master' into argumentTypeErrors 2014-07-25 06:40:51 -07:00
Anders Hejlsberg
511402cd84 Addressing CR feedback. 2014-07-24 19:39:50 -07:00
Daniel Rosenwasser
c625cd9259 Merge pull request #203 from Microsoft/arrowLookAhead
Improved lookahead for arrow functions.
2014-07-24 18:41:34 -07:00
Daniel Rosenwasser
b0c59e7c37 Merge branch 'master' into arrowLookAhead 2014-07-24 18:17:30 -07:00
Daniel Rosenwasser
b76c13cfd5 Addressed code review feedback. 2014-07-24 18:05:05 -07:00
Jason Freeman
86007cc137 Merge branch 'master' into labelledStatements
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/parser.ts
2014-07-24 17:48:11 -07:00
Vladimir Matveev
bb193fedb9 augment check for colliding declaration spaces 2014-07-24 17:03:37 -07:00
Vladimir Matveev
d7f67083b2 check groups of local symbols 2014-07-24 17:03:33 -07:00
Anders Hejlsberg
a515b199b7 Better error messages in function calls.
Fixes #93.
This is an evolution of #220.
2014-07-24 17:00:03 -07:00
Vladimir Matveev
7072711cf9 updated test baselines 2014-07-24 13:09:03 -07:00
Vladimir Matveev
6572c826a1 update check for object literal properties according to ECMA spec 2014-07-24 13:02:31 -07:00
Vladimir Matveev
9112a0e2e2 enabled strict mode 2014-07-24 13:01:25 -07:00
Jason Freeman
742637bec9 Add tracking for labelled statements, and errors on labelled jumps 2014-07-24 12:36:10 -07:00
Dan Quirk
439ee1eaee Merge pull request #223 from Microsoft/linuxTestFixes
Linux test fixes
2014-07-23 17:22:47 -07:00
Anders Hejlsberg
e742694b1a Merge pull request #199 from Microsoft/reservedWordsInTypeQueries
Allow reserved words in type queries.
2014-07-23 15:52:09 -07:00
Jason Freeman
1a66243d4f Remove inModuleBody 2014-07-23 14:09:17 -07:00
Daniel Rosenwasser
57d7cf54c6 Improved "certainty" when parsing arrow-function-lookin' expressions. 2014-07-23 13:31:24 -07:00
Jason Freeman
76804eb1f9 Add errors for break and continue statements 2014-07-23 12:07:46 -07:00
Jason Freeman
29284cb1b9 Merge branch 'master' into errorOnWithStatement 2014-07-23 11:53:58 -07:00
Jason Freeman
ed3d740df4 Merge branch 'master' into errorOnWithStatement 2014-07-23 11:52:40 -07:00
Daniel Rosenwasser
5fc2792297 Covered more cases for arrow functions omitting arrows.
Specifically where we have a full signature followed by an open curly brace.
2014-07-23 11:49:51 -07:00
Vladimir Matveev
d10f2e713e do not propagate property name as name for function expression 2014-07-23 11:48:29 -07:00
Dan Quirk
3ad77c6ea0 Be less clever, just use \r\n for newlines by default, tests can opt into different newlines, fix one more file casing test 2014-07-23 03:27:56 -07:00
Dan Quirk
329be5f77b Make a test that explicitly sets newline type 2014-07-23 15:56:50 -07:00
Dan Quirk
ec9d25f980 Trying to fix newlines in sourcemap baselines for *nix 2014-07-23 15:51:03 -07:00
Dan Quirk
33f946b0a4 Renames of existing baselines with casing to match the test files 2014-07-23 11:02:48 -07:00
Dan Quirk
d34f7fa384 Delete some baselines so we can rename them with different casing for Linux 2014-07-23 11:02:45 -07:00
Daniel Rosenwasser
5b6bb5b649 Improved lookahead for arrow functions.
Fixes issue #34.

Specifically:
    * We no longer automatically assume "()" is a function expression. It must be followed by an arrow, colon, or curly brace.
    * If an arrow is missing following a signature, but a curly brace is present, we assume the user forgot the arrow and try to parse the body anyway.
2014-07-22 17:01:10 -07:00
Anders Hejlsberg
0550b93635 Allow reserved words in type queries.
Fixes #181.
2014-07-22 15:11:24 -07:00
Daniel Rosenwasser
c8fc26a20a Merge pull request #147 from Microsoft/noReturnExpression
Complain when a non-void function lacks a return expresson.
2014-07-22 13:46:54 -07:00
Jason Freeman
f79cba2225 Type check the expression of the 'with' statement 2014-07-22 13:37:37 -07:00
Anders Hejlsberg
c5db1614f6 Aligning index signature type inference with assignability rules.
Type inference now supports inferring from string index signatures to numeric index signatures.
Fixes #167.
2014-07-22 11:53:06 -07:00
Anders Hejlsberg
13d64adeb9 Merge pull request #175 from Microsoft/contextualSignatureInstantiation
Added contextual signature instantiation during type inference.
2014-07-22 10:57:01 -07:00
Anders Hejlsberg
d85df9e9fa Addressing CR feedback.
Adding comment to explain source type instantiation.
Adding a test case.
2014-07-22 10:54:20 -07:00
Jason Freeman
8cbe88b501 Give a semantic error on with statements 2014-07-21 17:10:04 -07:00
Daniel Rosenwasser
9bb17a66cd Merge pull request #173 from Microsoft/singleDefaultClause
Check for multiple 'default' clauses.
2014-07-21 16:54:44 -07:00
Daniel Rosenwasser
0f4e887155 Changed error message for annotated functions lacking return statements. 2014-07-21 16:42:48 -07:00
Daniel Rosenwasser
1728f7c654 Changed check on annotated functions/getters to only look for return statements. 2014-07-21 16:42:46 -07:00
Daniel Rosenwasser
d33127ad34 Complain when a non-void/any function lacks a return expresson.
In effect this fixes #62.

Also
    - Changes the error message for get accessors lacking return expressions.
    - Actually checks for return expressions instead of return statements for get-accessors.
    - Removes fancy quotes.
    - Corrects errors in the compiler caught by the new check.
    - Simplified `checkAndAggregateReturnTypes` by extracting it out to `visitReturnStatements`.
2014-07-21 16:42:41 -07:00
Daniel Rosenwasser
fa04d4d699 Changed error spans for duplicate default clauses, added tests for it. 2014-07-21 15:57:30 -07:00
Daniel Rosenwasser
4ac676f718 Added checking for switch statements with multiple default clauses. 2014-07-21 15:19:54 -07:00
Dick van den Brink
4635215209 Fix browser tests not working when not cloned in TypeScript directory 2014-07-22 00:13:48 +02:00
Anders Hejlsberg
a25d3c1865 Accepting baselines. 2014-07-21 11:26:26 -07:00
Anders Hejlsberg
85225c8f29 Ensuring local module names are unique in emit.
Fixes #41 and #42.
2014-07-21 11:17:44 -07:00
Jason Freeman
585d9bdc5f Condense all error spans to just the name for variable, class, interface, module, enum and enum member 2014-07-21 09:55:43 -07:00
Jason Freeman
c2fc52e92b Update baselines for not emitting when module flag is not specified 2014-07-21 09:40:39 -07:00
Vladimir Matveev
f7d7623706 Merge pull request #155 from Microsoft/check_this
added collision check for '_this'
2014-07-20 21:22:58 -07:00
Vladimir Matveev
ea46b974e8 Merge pull request #157 from Microsoft/use_strict_in_functions
emit 'use strict' at the beginning of the function
2014-07-18 22:20:23 -07:00
Sheetal Nandi
9fd95fcb95 Report errors if the type parameter uses constraint that is using private type/module
Fixes #86
2014-07-18 18:11:04 -07:00
Sheetal Nandi
09ec1bb9ae Report error on Class/Interface heritage clause if it cant be accessed
Fixes #78 and #83
2014-07-18 18:07:38 -07:00
Vladimir Matveev
36c22d10c7 emit 'use strict' at the beginning of the function 2014-07-18 16:59:52 -07:00
Daniel Rosenwasser
819ea95953 Better error recovery for when an arrow function is missing a curly brace.
Also better identification of arrow function expressions.
2014-07-18 16:55:18 -07:00
Vladimir Matveev
30ecd19029 added collision check for '_this' 2014-07-18 16:16:28 -07:00
Sheetal Nandi
1abedc30c4 Merge pull request #142 from Microsoft/declFileErrorReporting
Compile the generated decl files and report those errors in the baseline so we can verify the result of dts file for correctness
2014-07-18 12:42:07 -07:00
Mohamed Hegazy
91b8a4531f Merge pull request #145 from Microsoft/restConstructorParam
Issue #144: Do not emit the name of the rest paramter in constructors
2014-07-18 09:57:49 -07:00
Sheetal Nandi
3665e45d19 Merge pull request #141 from Microsoft/typoInDeclFileEmit
Fixed the typo in declaration emitter of implements clause
2014-07-17 22:21:51 -07:00
Mohamed Hegazy
b744633656 Issue# 144: Do not emit the name of the rest paramter in constructors 2014-07-17 19:54:21 -07:00
Vladimir Matveev
52ab9f110e added new strict mode test 2014-07-17 18:32:26 -07:00
Sheetal Nandi
d09e5508e2 Report global errors and re-enable assert for the number of errors reported 2014-07-17 18:16:40 -07:00
Sheetal Nandi
8936662090 Enable compiler runner to report the errors from compiling generated declaration files 2014-07-17 18:16:32 -07:00
Sheetal Nandi
586b773fbe Fixed the typo in declaration emitter of implements clause 2014-07-17 18:16:24 -07:00
Vladimir Matveev
4068404cd4 emit prologue directives as first lines in file 2014-07-17 17:43:48 -07:00
Dan Quirk
58067891f1 Fix web test server for new repo 2014-07-17 15:35:09 -07:00
Vladimir Matveev
f1ce09caa3 do not propagate function name in property accessors 2014-07-17 14:18:24 -07:00
Daniel Rosenwasser
df5c2547fa Support automatic semicolon insertion in class member declarations. 2014-07-17 11:03:12 -07:00
Anders Hejlsberg
6b112b1a46 Merge branch 'master' into MergingErrors
Conflicts:
	src/compiler/checker.ts
2014-07-16 16:31:08 -07:00
Anders Hejlsberg
bc0be761cd New baselines. 2014-07-16 16:15:10 -07:00
Sheetal Nandi
fe1fea3710 Merge pull request #30 from Microsoft/declarations
Changes to determine when to qualify the symbol in given enclosing declaration
2014-07-16 15:20:00 -07:00
Daniel Rosenwasser
cece68098a Better error recovery when errant semicolon found in a class. 2014-07-16 15:06:03 -07:00
Anders Hejlsberg
e4ea5ef1f9 Fix for 954635: Clodule declaration ordering
Fix for 955714: Fundule declaration ordering
2014-07-16 14:23:39 -07:00
Daniel Rosenwasser
9ecf01b57a When importing, only check for reserved type names when importing a type. 2014-07-16 14:08:15 -07:00
Jason Freeman
2af62a9912 Error for more than one enum omitting an initial initializer 2014-07-16 13:50:08 -07:00
Jason Freeman
17563f3c5d Remove SymbolLinks.typeChecked 2014-07-16 13:34:27 -07:00
Sheetal Nandi
148abea09d Use the isDeclarationVisible in checker to determine if the declaration needs to be emitted
This would help in unifying logic of when to check if the type is visible
2014-07-16 11:37:49 -07:00
Sheetal Nandi
5a23dd0684 Check if accessible symbol needs futher qualification 2014-07-16 11:30:38 -07:00
Sheetal Nandi
d8f3481d38 Check if there is alias symbol in the scope corresponding to the symbol whose name we are trying to get in the symbol table 2014-07-16 11:30:34 -07:00
Sheetal Nandi
2273355df4 Start emitting qualified path if the current symbol is not visible in enclosing declaration
Note that this doesnt handle aliases yet.
2014-07-16 11:30:14 -07:00
Vladimir Matveev
546a8492f2 fixed references in perftc 2014-07-15 16:06:53 -07:00
Sheetal Nandi
6a68b3744c Do not emit arrow style call signatures when writing T of T[] 2014-07-15 13:08:13 -07:00
Sheetal Nandi
574c075dba Emit the types in declaration file 2014-07-15 13:08:10 -07:00
Daniel Rosenwasser
c777d5c68a Report error on unclosed multiline comment.
Fixes #22
2014-07-15 12:21:16 -07:00
Sheetal Nandi
455364cf5a Do not emit the signature for implementation of overload in the declaration file 2014-07-15 08:58:02 -07:00
Sheetal Nandi
d1cdf03d53 Correct the external module check to determine if declaration is part of export assignment 2014-07-15 08:57:48 -07:00
Sheetal Nandi
bb7f7fb8dd Correct the condition for variable statement emit in the declaraiton file 2014-07-15 08:57:39 -07:00
Sheetal Nandi
cd14e36460 Emit alias declaration if its name is used as identifier of export assignment 2014-07-15 08:57:30 -07:00
Sheetal Nandi
063399d228 Emit declaration if its identifier is used in export assignment of external module 2014-07-15 08:57:22 -07:00
Sheetal Nandi
ea7c23eb63 Emit global context declarations into the declaration file 2014-07-15 08:57:12 -07:00
Dan Quirk
da4547ff5a Responding to CR feedback 2014-07-14 17:05:49 -07:00
Dan Quirk
4b1ff742dd Updating some tests for resolved bugs 2014-07-14 16:47:50 -07:00
Vladimir Matveev
e9cd8a0e88 add prefixes for getCanonicalName 2014-07-14 14:44:56 -07:00
Daniel Rosenwasser
56f29e02d2 Preserve trailing commas on array- and object-literals. 2014-07-14 14:26:19 -07:00
Daniel Rosenwasser
ef67d5740e Support emit for trailing comma in array literals. 2014-07-14 14:26:17 -07:00
Jason Freeman
79d9539f7b Syntax error for nonambient module with a quoted name 2014-07-14 11:47:39 -07:00
Mohamed Hegazy
214df64e28 Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00