Commit Graph

48 Commits

Author SHA1 Message Date
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Evgeny Gerashchenko 2f89352d80 Added AUTOCAST mark when expression is used as for-loop iterable. 2012-09-14 16:12:16 +04:00
Andrey Breslav a267f65fa1 Front-end test data fixed to have no complex patterns
#KT-2359 In Progress
2012-09-05 14:18:40 +04:00
Svetlana Isakova b63d3905f9 KT-1256 Error highlighting in IDE should be less annoying
#KT-1256 fixed
2012-05-22 18:23:51 +04:00
Svetlana Isakova d4b816ef56 KT-1743 Analyze immutable local variables and parameters which are captured in closure
#KT-1743 fixed
2012-05-03 17:56:45 +04:00
Evgeny Gerashchenko 1123a4f438 Clarified error message for TYPE_MISMATCH_IN_BINDING_PATTERN. 2012-04-19 15:21:59 +04:00
Evgeny Gerashchenko 6a13510741 Replaced Diagnostic.getMessage() with DiagnosticRenderer.render() calls.
Made Diagnostic.getMessage() deprecated, introduced DiagnosticRender interface and default implementation for it.
2012-04-13 19:31:45 +04:00
Evgeny Gerashchenko 6b2e90126d Fixed highlighting for safe access dot. 2012-04-11 15:53:57 +04:00
Evgeny Gerashchenko 05fd46009d Replaced diagnostic factories so they show type FQ names instead of short names.
#KT-1137 fixed
2012-04-08 22:45:07 +04:00
Evgeny Gerashchenko c989b2e5ba Updated "Autocasts" test data in JetPsiCheckerTest. Replaced types with their FQ names. 2012-04-04 16:14:00 +04:00
Svetlana Isakova 9dc9e9984b KT-1572 Frontend doesn't mark all vars included in closure as refs. 2012-03-14 15:07:33 +04:00
Svetlana Isakova cc244fad94 KT-1191 Wrong detection of unused parameters
KT-1219 Incorrect 'unused value' error in closures
2012-02-24 12:09:02 +04:00
Stepan Koltsov 4b94eb5e2b rewrite owner when copying FunctionDescriptor from supertype scope
that fixes invocation:

>>> StringBuilder.length()

that was compiled to

>>> invokevirtual CharSequence.length()

and now compiles to

>>> invokevirtual StringBuilder.length()

Essentially patch rewrites FunctionDescriptor.containingDeclaration
when FunctionDescriptor is copied to subclass scope.

FunctionDescriptor now has kind field that can be
* DECLARATION (for "real" function, maybe abstract)
* DELEGATION
* FAKE_OVERRIDE (created for functions from supertypes)

All tests pass although some parts of code are buggy and ugly.

Random comments about this patch:

* FunctionDescriptor.overrides point to function descriptors of supertype scopes

* Filling of memberScope with supertypes is moved to OverrideResolver

* ExpressionCodegen.intermediateValueForProperty must be rewritten

* Patch adds not nice REDECLARATION reports (see compiler/testData/diagnostics/tests/*).
  Will be fixed later.
2012-02-10 20:36:40 +04:00
svtk becd713111 KT-234 Force when() expressions to have an 'else' branch
KT-973 Unreachable code
2012-01-18 13:31:42 +04:00
Andrey Breslav 3808bff1ce GreatSyntacticShift: Checker test data fixed 2011-12-21 11:24:04 +02:00
Andrey Breslav 8a93421ecb KT-597 Type inference failed
Resolution rules changed: now autocast and non-autocast candidates are judged together
2011-11-29 21:03:42 +03:00
svtk a7bb30a18c "Unused value" error added to existed tests 2011-11-24 15:59:44 +04:00
Andrey Breslav 4224e00cbd Most of the tests fixed 2011-11-10 21:33:46 +03:00
Dmitry Jemerov a3f8a088be JetPsiCheckerTest and its testdata moved back to plugin tests 2011-10-27 18:44:39 +02:00
Dmitry Jemerov ec6dec0d37 separate compiler and plugin tests 2011-10-20 16:21:18 +02:00
Andrey Breslav 1b4bebaaf0 Autocasts for 'this' and stable qualified expressions 2011-10-18 22:30:39 +04:00
Andrey Breslav a7db6747a6 KT-359 ++/--/+= must be included into calculation of MUST_BE_WRAPPED_IN_A_REF 2011-10-17 21:09:18 +04:00
Andrey Breslav 22223cb6b0 Vars modified in closures are marked with a MUST_BE_WRAPPED_IN_A_REF key 2011-10-13 19:11:20 +04:00
Andrey Breslav cb00be336c Test data fixed 2011-10-13 17:49:08 +04:00
svtk 50418698db Changes after forbidding modality modifiers in accessors 2011-10-03 17:47:26 +04:00
svtk 10f16627ef Added error 'abstract accessor of non abstract property' 2011-09-29 15:40:55 +04:00
Andrey Breslav 292fe08b9d More override control.
Renderers in errors.
Constructor parameters are not properties unless otherwise specified
2011-09-26 19:39:27 +04:00
Andrey Breslav 71bc41a938 KT-286 Check supertype lists (in progress)
Tests involving multiple inheritance fixed
2011-09-08 16:20:01 +04:00
svtk fa631503ef partial support for 'abstract' modifier added 2011-09-06 13:25:56 +04:00
svtk bda26a18ff little fixes 2011-08-31 14:49:42 +04:00
svtk 847c727ad0 bug with automatically casting mutable variables (KT-228) fixed 2011-08-23 11:44:56 +04:00
svtk 3f4f0c8737 bug with incorrect merge of data flow info (KT-104) fixed 2011-08-22 19:12:22 +04:00
svtk 9ebffafd89 added expected type for assignment and elvis operator
changed return type for safe operator (now it works as a?.b is Nullable type, constructions like a?.b.c need another parsing)
2011-08-17 12:21:26 +04:00
Andrey Breslav 4121aed773 !is supported in data flow info for ifs 2011-07-05 10:55:33 +04:00
Andrey Breslav 94f00509e2 JET-34 Require a return statement in a function with a block body
JET-77 Require a return type annotation for non-Unit returning functions with block bodies
2011-06-17 18:03:30 +04:00
Andrey Breslav 41d2c73c06 No propagation of names bound in patterns to else-branches 2011-06-15 14:38:19 +04:00
Andrey Breslav 400e939c21 Bindings are propagated over control flow, only directly, otherwise it is confusing 2011-06-14 18:48:27 +04:00
Andrey Breslav 79d3f318b9 Bindings are propagated over control flow, scope intersections are not supported yet 2011-06-13 16:12:32 +04:00
Andrey Breslav 3cacb512a3 Working on bindings in ifs 2011-06-13 14:33:32 +04:00
Andrey Breslav c2aceefe76 Working on bindings 2011-06-12 21:54:35 +04:00
Andrey Breslav d4b1658bde Autocasts & binding patterns in 'when'-expressions 2011-06-12 21:30:22 +04:00
Andrey Breslav 7536501607 LIFO order for autocasts 2011-06-12 18:38:05 +04:00
Andrey Breslav d64b5b3a74 Autocasts implemented 2011-06-12 18:21:35 +04:00
Andrey Breslav 9a9c78da9e JET-67 Property with abstract getter forces class to have primary constructor 2011-05-30 16:22:30 +04:00
Andrey Breslav 441bef9935 JET-9 Support hasBackingField for properties which are parameters of the primary constructor 2011-05-04 14:21:45 +04:00
Andrey Breslav 244fc31da8 JET-16 Check property initializers as parts of the primary constructor's body 2011-04-26 18:47:16 +04:00
Andrey Breslav ca579e25b7 $field is only allowed in property accessors 2011-04-20 16:25:35 +04:00
Andrey Breslav 9add2b6114 Tests for hasBackingField 2011-04-20 16:17:46 +04:00