Commit graph

68 commits

Author SHA1 Message Date
Jason Freeman 1a66243d4f Remove inModuleBody 2014-07-23 14:09:17 -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
Vladimir Matveev d10f2e713e do not propagate property name as name for function expression 2014-07-23 11:48:29 -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
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