Commit Graph

223 Commits

Author SHA1 Message Date
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 c857785910 KT-1002 If there's no return in function highlight only last token but not last statement 2012-03-09 12:20:10 +04:00
Svetlana Isakova b6161cb41b Bug with wrong 'anonymous initializer without constructor' fixed 2012-03-05 17:05:36 +04:00
Andrey Breslav cefd9d5ca2 KT-627 Drop Predicate expression 2012-02-27 12:58:23 +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
Alex Tkachman 53bba59a4f dbl -> toDouble 2012-02-22 13:14:41 +02:00
Andrey Breslav bff62484b1 KT-1306123.lng or 123.sht is not good name 2012-02-20 21:42:13 +04:00
Svetlana Isakova 046c13a264 KT-1041 Add check that thrown/catched expression is of Throwable type 2012-02-20 14:03:39 +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 6251b413a2 New check rules for inc, plus & plusAssign
KT-1176 arrayList[0]++. Setter is stored for array access expression when it's needed
2012-02-03 12:10:12 +04:00
Andrey Breslav 1b88be725a Nullability fixed in a test 2012-01-31 11:37:01 +04:00
svtk 11ad28812d KT-1175 Mark unused literals 2012-01-27 18:32:55 +04:00
Andrey Breslav 90b98a63b5 KT-1130 Remove ref from keywords 2012-01-25 13:12:42 +04:00
svtk 70d0cd882b KT-650 Prohibit creating class without constructor 2012-01-24 16:58:29 +04:00
svtk b3eb44e769 removed some string methods from library.jet 2012-01-20 19:32:12 +04:00
svtk 7fae503a38 KT-1080 Don't use previously imported packages while resolving import references 2012-01-20 11:58:17 +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
svtk 390eb0cde3 forbid import of functions and properties from objects 2012-01-12 18:39:25 +04:00
Nikolay Krasko 0573efa6fb KT-960 import namespace should give unresolved reference 2012-01-11 13:55:20 +04:00
Stepan Koltsov 6446e83b29 remove VariableDescriptor.inType
(approved by Andrey Breslav)
2011-12-30 18:45:49 +04:00
Andrey Breslav 7fcae64766 Parser test data fixed 2011-12-27 15:20:31 +04:00
Andrey Breslav 1704247534 Merge remote branch 'origin/master'
Conflicts:
	idea/testData/checker/RecursiveTypeInference.jet
2011-12-27 15:00:33 +04:00
Andrey Breslav b453880d9c Better message for recursive type inference 2011-12-27 14:59:24 +04:00
Andrey Breslav 2d78ccb9e1 Annotator test data fixed 2011-12-27 14:54:41 +04:00
Andrey Breslav fa5be15852 Diagnostics test data fixed 2011-12-26 19:55:29 +04:00
Andrey Breslav f52eae71d0 GreatSyntacticShift: 'namespace' -> 'package' 2011-12-25 15:51:59 +04:00
Andrey Breslav 889c7c0002 GreatSyntacticShift: erroneous fix reverted 2011-12-21 11:48:24 +02:00
Andrey Breslav f67c6549eb GreatSyntacticShift: Codegen testdata fixed 2011-12-21 11:45:50 +02:00
Andrey Breslav 3808bff1ce GreatSyntacticShift: Checker test data fixed 2011-12-21 11:24:04 +02:00
Andrey Breslav 0a2108d4d0 Constraint priorities integrated 2011-12-16 13:09:28 +04:00
svtk 63d74d41af KT-328 completion //Local function in function literals cause exceptions 2011-12-09 17:37:38 +04:00
svtk e05dea7046 added specializing error "Variable initializer is redundant" for unused-vars analysis 2011-12-08 13:43:46 +04:00
svtk af3b06b65b Merge remote-tracking branch 'origin/master'
Conflicts:
	compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetFlowInformationProvider.java
2011-12-06 22:42:50 +04:00
svtk ec55dddfcd backing fields resolve changed
KT-462 Consider allowing initializing properties via property names when it is safe
KT-598 Allow to use backing fields after this expression
2011-12-06 22:41:19 +04:00
Stepan Koltsov 0d5f507a6c split Bounds.jet test into smaller tests 2011-12-06 22:32:07 +04: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 ba49f508c9 KT-609 Analyze not only local variables, but function parameters as well in 'unused values' analysis 2011-11-29 19:04:15 +04:00
svtk 27293562ae Merge remote-tracking branch 'origin/master' 2011-11-28 13:15:35 +04:00
svtk ecb3db0912 KT-610 Distinguish errors 'unused variable' and 'variable is assigned but never accessed' 2011-11-28 13:15:03 +04:00
Nikolay Krasko 0c758902ef KT-621 Remove .foo() pattern matching from when (Some tests were rewritten) 2011-11-25 17:39:16 +04:00
svtk 63304cc2cf Merge remote-tracking branch 'origin/master' 2011-11-24 16:02:44 +04:00
svtk a7bb30a18c "Unused value" error added to existed tests 2011-11-24 15:59:44 +04:00
Stepan Koltsov e33af7f729 KT-328 Local function in function literals cause exceptions
===
fun bar() = {
  bar()
}
===
2011-11-23 16:40:50 +04:00
Andrey Breslav c74a0a62cc KT-313 Bug in substitutions in a function returning its type parameter T 2011-11-12 20:29:38 +04:00
Andrey Breslav 4224e00cbd Most of the tests fixed 2011-11-10 21:33:46 +03:00
svtk 0356bd98ec KT-411 Wrong type expected when returning from a function literal 2011-11-09 16:43:29 +04:00
svtk 2d6337fe93 KT-456 No check for obligatory return in getters 2011-11-09 12:22:08 +04:00
svtk 44ae29b01d Merge branch 'master' of ssh://git.labs.intellij.net/jet 2011-10-28 13:44:39 +04: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