Commit graph

302 commits

Author SHA1 Message Date
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 518a5d3a48 Rudimentary template support, excluding tagging. 2014-10-23 14:57:47 -07:00
Anders Hejlsberg 8f29661e01 Implementation of Type Aliases in compiler core 2014-10-23 14:30:43 -07:00
Jason Freeman 47bded060e Specify error message for type argument inference failing 2014-10-22 15:08:18 -07:00
Jason Freeman 44f1ab07bf Give different errors for different overload resolution issues 2014-10-22 15:08:14 -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 dd5c89d5cf Update error messages 2014-10-20 13:48:22 -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
Mohamed Hegazy e15f4e6d34 Merge branch 'master' into letAndConst
Conflicts:
	src/compiler/types.ts
2014-10-16 09:30:58 -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 1dde985f1d Do not allow use of block-scoped variable before its definition 2014-10-13 22:19:19 -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 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
Chris Bubernak 16f91b1ef3 fixed error message and updated necessary baselines 2014-10-08 17:23:16 -07:00
Anders Hejlsberg ea4cbbee4e Merge branch 'master' into unionTypes 2014-10-08 15:23:37 -07:00
Chris Bubernak cbfbae94fd Added a message & a check for numerics in the parser 2014-10-05 22:21:43 -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
Anders Hejlsberg e836fe1729 Initial implementation of Union Types 2014-10-04 09:19:47 -07:00
Chris Bubernak 4714c26543 rewrote changes to the checker 2014-10-03 08:09:57 -07:00
ChrisBubernak 12e1566af1 First changes to checker for this fix 2014-10-02 16:02:29 -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
Anders Hejlsberg c990c4282d Improved error messages for private and protected member access 2014-09-19 06:35:59 -07:00
Anders Hejlsberg ce6b6234ef Support for protected members in classes 2014-09-17 10:36:32 -07:00
Anders Hejlsberg b4cddc3903 Merge branch 'master' into tupleTypes 2014-09-15 11:04:58 -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
Anders Hejlsberg be7e0a75e9 Merge branch 'master' into tupleTypes 2014-09-05 13:52:45 -07:00
Sheetal Nandi a87a7794f4 Report error if exports or require is used for declaration name in external module
Fixes #63
2014-08-29 18:45:38 -07:00
Cyrus Najmabadi 9aee22b943 Merge branch 'master' into newLanguageService
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/harness/fourslash.ts
	src/harness/harness.ts
	src/harness/harnessLanguageService.ts
	src/harness/rwcRunner.ts
	src/services/services.ts
2014-08-22 14:23:14 -07:00
Daniel Rosenwasser a366984bc9 Reassigned diagnostic codes. 2014-08-18 15:42:27 -07:00
Anders Hejlsberg 0cf503fd9f Merge branch 'master' into tupleTypes
Conflicts:
	tests/baselines/reference/typeName1.errors.txt
2014-08-16 11:11:59 -07:00
Daniel Rosenwasser 5c59360ef7 Merge branch 'master' into diagnosticsCleanup 2014-08-15 17:17:27 -07:00
Cyrus Najmabadi 87ebb6b2da add rename localization messages. 2014-08-15 16:22:58 -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 92b367741b Adding error message for empty tuple types. 2014-08-13 11:13:24 -07:00
Daniel Rosenwasser 978855678d Removed duplicate diagnostic. 2014-08-12 15:15:45 -07:00
Daniel Rosenwasser e6c42faa7c Addressed CR feedback, removed NoPrefix messages. 2014-08-12 14:56:27 -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
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
Daniel Rosenwasser 122b78612c Recovered deleted, renumbered existing, reworded some. 2014-08-07 15:59:49 -07:00
Daniel Rosenwasser d7e3447909 Removed more unused diagnostics. 2014-08-07 15:59:47 -07:00
Daniel Rosenwasser 2bc8359b16 Removed unused diagnostics. 2014-08-07 15:59:46 -07:00
Daniel Rosenwasser 0c0d607087 Removed duplicate messages from diagnosticMessages.json. 2014-08-07 15:59:44 -07:00
Sheetal Nandi 2654eed32d Report privacy errors for accessors 2014-08-06 18:42:14 -07:00
Jason Freeman 72cf78f681 Error on octal literals in ES5 and strict mode 2014-08-06 18:10:16 -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
Daniel Rosenwasser 3ad6e31aa5 Merge pull request #351 from Microsoft/wontYouPleasePleaseHelpMe
Support the '--help' compiler flag.
2014-08-06 11:59:18 -07:00
Sheetal Nandi 00b4c2e96d Report errors on properties and variable type visibility
Fixes #69
2014-08-06 11:53:54 -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
Daniel Rosenwasser 81c4b0b900 Merge branch 'master' into wontYouPleasePleaseHelpMe
Conflicts:
	src/compiler/commandLineParser.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2014-08-05 12:50:16 -07:00
Daniel Rosenwasser a1a1ea3f96 Fixed up duplicate diagnostic. 2014-08-04 18:23:59 -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
Daniel Rosenwasser 30509f1ecc Changed messages, got rid of 'oldProgram'. 2014-08-01 18:54:26 -07:00
Daniel Rosenwasser 2dd9763bad Implemented --help. 2014-08-01 17:33:14 -07:00
Daniel Rosenwasser 616dae20f0 Fixed diagnostic generator; added messages. 2014-08-01 17:24:02 -07:00
Daniel Rosenwasser 617910b3d4 Support the '--watch' compiler flag. 2014-07-31 14:57:54 -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
Vladimir Matveev 59b1e46102 disallow statements between overloads 2014-07-30 16:27:13 -07:00
Daniel Rosenwasser a87a686496 Merge pull request #304 from Microsoft/likeaversion
Print version number for --version.
2014-07-30 11:22:31 -07:00
Daniel Rosenwasser 570d2bda33 Print version number for --version. 2014-07-29 14:17:39 -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
Anders Hejlsberg 3da5f1ef6f Error when importing shadowed internal module.
Fixes #73.
2014-07-26 08:13:52 -07:00
Jason Freeman 478fadfe3d Disallow modifiers on export assignments (fix #164) 2014-07-25 16:39:24 -07:00
Jason Freeman 936863c299 Update error message to be more consistent with others 2014-07-25 14:01:50 -07:00
Jason Freeman b2abab2f93 Improve the error in a 'for in' statement 2014-07-25 12:38:36 -07:00
Vladimir Matveev 42df260eb5 use getEffectiveDeclarationFlags to get Export flag 2014-07-25 11:15:19 -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
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 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 b9971f2876 Add consumption points and error reporting for labelled statement errors 2014-07-23 16:48:18 -07:00
Jason Freeman e2617750b1 Track control flow contexts in the parser, and give errors for break, continue, return 2014-07-23 11:57:34 -07:00
Jason Freeman ed3d740df4 Merge branch 'master' into errorOnWithStatement 2014-07-23 11:52:40 -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 8cbe88b501 Give a semantic error on with statements 2014-07-21 17:10:04 -07:00
Daniel Rosenwasser 0f4e887155 Changed error message for annotated functions lacking return statements. 2014-07-21 16:42:48 -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 4ac676f718 Added checking for switch statements with multiple default clauses. 2014-07-21 15:19:54 -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 30ecd19029 added collision check for '_this' 2014-07-18 16:16:28 -07:00
Anders Hejlsberg 70f8057dc7 Addressing code review feedback. 2014-07-16 16:14:29 -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
Jason Freeman 2af62a9912 Error for more than one enum omitting an initial initializer 2014-07-16 13:50:08 -07:00
Anders Hejlsberg c1d0fd979d More I/O fixes
Support for --charset command line option
File read and write errors are propagated into compiler diagnostics
emitFiles returns diagnostics in EmitResult
2014-07-16 10:57:05 -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