Commit Graph

548 Commits

Author SHA1 Message Date
Alex Tkachman 181f4d444d fix for broken test 2012-02-21 15:45:43 +02:00
Alex Tkachman 8b622f97f4 getting rid of TypeInfo 2012-02-21 14:54:00 +02:00
Stepan Koltsov a1d88a0877 recognize @NotNull
http://youtrack.jetbrains.com/issue/KT-129
2012-02-20 22:37:06 +04:00
Andrey Breslav bff62484b1 KT-1306123.lng or 123.sht is not good name 2012-02-20 21:42:13 +04:00
Svetlana Isakova b35d340056 KT-1270 Poor highlighting when trying to dereference a nullable reference 2012-02-20 20:12:57 +04:00
Svetlana Isakova 05dfdc7377 KT-1293 Kompiler doesn't show error when element of Array<Int?> is assigned to Int 2012-02-20 17:31:08 +04:00
Alex Tkachman 436c298e47 weird bug with nested closures using outer receiver 2012-02-20 12:15:02 +02: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 ea8eb7412a kill redeclaration handler in ClassDescriptor 2012-02-19 22:02:37 +04:00
Stepan Koltsov ca8cf6cb49 missing error report on incompatible declaration
===
open class Aaaa() {
    fun bb() = 1
}

class Bbbb() : Aaaa() {
    fun <T> bb() = 1
}
===
2012-02-19 22:02:33 +04:00
Stepan Koltsov 842a70ca66 report conflicting overloads in functions with same parameters different type parameters
test case:

===
class Aaa() {
    fun f() = 1
    fun <P> f() = 1
}
===
2012-02-18 00:33:37 +04:00
Stepan Koltsov 3b56b90a7c split ConflictingOverloads.jet test, add property overload conflict test 2012-02-18 00:33:26 +04:00
Stepan Koltsov d2a137d944 fix reading of jet signature with type parameter referencing self
===
class Something<A : Comparable<A>>
===

reported by Max

Also merge copy-paste in JavaDescriptorResolver
2012-02-17 22:32:11 +04:00
Alex Tkachman 252cd63d1c KT-633 test for obsolete issue 2012-02-17 09:36:09 -05:00
Alex Tkachman fac424c574 KT-725 test for obsolete issue 2012-02-17 09:12:48 -05:00
Alex Tkachman 082fdebaae KT-723 optional boxing after call to .inc() 2012-02-17 09:08:41 -05:00
Stepan Koltsov cf7be620a7 Read*BinaryClassTest: compare serialized namespace with hardcopy 2012-02-15 16:15:31 +04:00
Stepan Koltsov b67bb356bd fix inner classes in JavaDescriptorResolver, kill type variable by psi resolver 2012-02-15 00:02:06 +04:00
Stepan Koltsov e3fdc5d595 fix a case of fake override of abstract and non-abstract function
===
open class Ccc() {
    fun foo() = 1
}

trait Ttt {
    fun foo(): Int
}

class Zzz() : Ccc(), Ttt // there must not be an error here
===

Reported by Andrey Breslav as a bug of Comparator implementation:

===
fun comparator<T>(f: (T, T) -> Int): Comparator<T> = object : Comparator<T>, Object() {
    override fun compare(o1: T, o2: T): Int = f(o1, o2)
}
===
2012-02-13 23:34:01 +04:00
Alex Tkachman 845e873296 KT-1159 test for obsolete issue 2012-02-13 09:54:12 +02:00
Alex Tkachman ace34b01bc KT-1202 object construction fix 2012-02-13 08:34:10 +02:00
Alex Tkachman 9f4ef7fb6a KT-1186 test added 2012-02-11 13:04:26 +02:00
Alex Tkachman a2b602a440 KT-694 - support for simple enums 2012-02-11 13:00:28 +02:00
Alex Tkachman d81ca43b6e KT-1047 - obsolete. test added 2012-02-11 11:48:50 +02:00
Alex Tkachman 8d9434548f KT-1199 - test and fix for erased case 2012-02-11 11:09:02 +02: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
Evgeny Gerashchenko b6fe7fe85f Added compiler diagnostic for unresolved IDE templates. 2012-02-10 12:38:46 +04:00
Stepan Koltsov 9b6e051dc1 split SuperGenTest.enclosed 2012-02-09 23:40:51 +04:00
Stepan Koltsov 5c8fb3febf split FunctionGenTest.defaultArgs 2012-02-09 22:25:19 +04:00
Stepan Koltsov 6a8f2e14fb another case in JetDiagnosticsTest
simple unclassified case not covered by other tests
2012-02-09 22:25:11 +04:00
Stepan Koltsov bb0cf4f92f JetDiagnosticsTest: diamond with generics 2012-02-09 19:04:17 +04:00
Stepan Koltsov 7ad452109f split SuperGenTest.basicmethod 2012-02-09 18:39:10 +04:00
svtk 255e37efb9 KT-799 Allow 'return' expressions in conditionals assigned to variables 2012-02-09 12:58:17 +04:00
Evgeny Gerashchenko cf5f419549 Added parser test for ide templates. 2012-02-08 21:12:42 +04:00
Evgeny Gerashchenko 7bbc121f72 Fixed parser test. 2012-02-08 16:13:25 +04:00
Evgeny Gerashchenko bc9f67b6e2 Made parser aware of object literals in statement position (they were parsed as object declarations) 2012-02-08 15:58:08 +04:00
Stepan Koltsov 0c821f947d split diagnostics/Override.jet test 2012-02-08 00:55:43 +04:00
Stepan Koltsov ba15b59ff5 add missing JDK classes to mockJDK
java.lang.Appendable and several others
2012-02-04 12:49:35 +04:00
Stepan Koltsov 5dfcda80c0 Test never worked. Mark it pending for convenience. 2012-02-04 12:15:23 +04:00
Stepan Koltsov 9015ce29c2 diamond inheritance in JetDiagnosticsTest 2012-02-04 11:59:57 +04:00
Stepan Koltsov 3623c7fc59 OverrideFunctionWithParamDefaultValue test in JetDiagnosticsTest 2012-02-04 11:59:54 +04:00
svtk 0632f90c53 KT-1193 Check enum entry supertype 2012-02-03 20:35:29 +04:00
Andrey Breslav 649a639bba Test for
KT-274  Add Enumeration.iterator () method in global namespace
2012-02-03 15:04:14 +04:00
Andrey Breslav abd0932dfe Test for
KT-274  Add Enumeration.iterator () method in global namespace
2012-02-03 15:00:55 +04:00
svtk 75f1f06862 test for KT-1028 2012-02-03 13:14:50 +04:00
svtk 34ee879094 KT-1189 StackOverflow in ide 2012-02-03 13:14:28 +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
svtk db07a33d59 Added reference to array set method for expression like 'array[0]++' 2012-02-03 12:10:12 +04:00
svtk 1cb4c89c5c Mark only brackets when array access expression is unresolved 2012-02-03 12:10:12 +04:00
Stepan Koltsov e075bec4c0 JavaDescriptorResolver refactoring
* kill JavaDescriptorResolver.typeParameterDescriptorCache
* use ClassOrNamespaceDescriptor instead of DeclarationDescriptor

Code is a bit ugly now, but simpler than before.
2012-01-31 22:48:55 +04:00