Commit Graph

35 Commits

Author SHA1 Message Date
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Pavel V. Talanov 2987e72d29 Do not report redeclaration when outer class and default object's members clash
Previously we prohibited classes and properties with the same name (now it's unnecessary)
Add test for backends that they support qualified (by default object name) member references inside class body
2015-03-11 21:06:05 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Pavel V. Talanov ffabe19229 Prohibit accessing nested classes/objects of class object using class literal
The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
2015-03-03 13:04:29 +03:00
Pavel V. Talanov a1f4c06a49 Update test data that mentioned old JvmAbi constants 2015-02-16 15:38:34 +03:00
Pavel V. Talanov 894c3bceac Test: add jvm backend test for named class object 2015-02-16 15:38:29 +03:00
Alexander Udalov f3b2193afd Delete traces of "jet" in test data and unimportant code 2015-01-13 15:02:16 +03:00
Denis Zharkov 654411a0b0 Refactored tests using Array constructor:
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00
Stanislav Erokhin fc8cec9509 Create PRIVATE_TO_THIS visibility 2014-12-08 18:24:30 +03:00
Alexander Udalov a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Alexander Udalov 128c938965 Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00
Svetlana Isakova 8289f13016 Introduced QualifierReceiver instead of PackageType 2014-09-01 12:32:49 +04:00
Alexander Udalov 98ffdb3e32 Minor, delete Object from some test data 2014-07-25 21:19:39 +04:00
Alexander Udalov fb958897a9 Introduce kotlin.Cloneable
- Cloneable is a trait with a single protected member 'clone', which is mapped
  to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
  implementations. Also if you need your class to be Cloneable, most of the
  time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic

 #KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Alexander Udalov a79398fa00 Don't load Object as a supertype for Java classes
#KT-4890 In Progress
 #KT-5002 Fixed
2014-07-25 21:19:37 +04:00
Alexander Udalov 6210e45fbc Minor, improve test case for KT-1157
Multithreaded version was not working correctly and was throwing NPEs in the
log sometimes
2014-05-29 21:07:34 +04:00
Alexander Udalov 9760f30c99 Don't allow fake override to inherit implementation with wrong return type
#KT-4763 Fixed
2014-05-22 19:32:10 +04:00
Alexander Udalov fbf9f5f7d0 Don't generate bridges for equals(), hashCode(), toString()
Otherwise an assertion is failing in the algorithm which is related to an
inconsistency of java.lang.Object inheritance in JDR (KT-4890)
2014-04-24 16:10:12 +04:00
Alexander Udalov f7b6457139 Replace "jet" package name with "kotlin" in testData 2014-03-02 19:55:26 +04:00
Alexander Udalov 3dcd85bdb4 Add toString() to Any, fix all tests
#KT-4517 Fixed
2014-03-02 19:54:49 +04:00
Alexander Udalov 8b918ef1aa Add regression tests for obsolete issues
#KT-1291 Obsolete
 #KT-2895 Obsolete
 #KT-3060 Obsolete
 #KT-3298 Obsolete
 #KT-3613 Obsolete
 #KT-3862 Obsolete
2014-02-13 04:43:53 +04:00
Alexander Udalov e2622b5dbb Resolve extension calls on class objects
#KT-3470 Fixed
2013-11-18 19:51:29 +04:00
Mikhael Bogdanov c9215ed8a5 KT-2784 VerifyError when passing a value to a class object's super type constructor
#KT-2784 Fixed
2013-08-12 18:58:09 +04:00
Svetlana Isakova 3cf133bff7 changed local extensions priority
local extensions aren't longer chosen before members
2013-06-20 13:43:01 +04:00
Mikhael Bogdanov 86f2a6dc69 Tests for not reproduced KT-1770, KT-3001 and KT-3414
#KT-3414 Can't Reproduced
 #KT-3001 Can't Reproduced
 #KT-1770 Can't Reproduced
2013-06-18 14:46:14 +04:00
Mikhael Bogdanov 79cf02ffb9 Fix for KT-3546: Exception when delegating to ArrayList
#KT-3546 Fixed
2013-06-18 13:23:54 +04:00
Mikhael Bogdanov 52ead7a350 Fix for static - write NEED_SYNTHETIC flag on original descriptor 2013-06-17 17:25:40 +04:00
Nikolay Krasko 37cd7eb1ba Allow resolve class declarations in class objects
Use INACCESSIBLE_OUTER_CLASS_EXPRESSION error for marking already resolved elements

 #KT-3261 Fixed
2013-06-07 17:24:17 +04:00
Alexander Udalov 974df0ed8e Use FunctionImplN instead of FunctionN in codegen
Superclass of closures should now be FunctionImplN instead of FunctionN. Since
these -Impl classes are needed only in JVM, the corresponding descriptors and
types are created in the back-end only.
2013-04-22 17:59:29 +04:00
Natalia.Ukhorskaya f2b3be7416 Unify properties initialization for init and clinit 2013-04-17 16:18:10 +04:00
Mikhael Bogdanov 93b860e4ad Always generate getter and setter 2013-03-20 20:50:06 +04:00
Alexander Udalov 68844131b0 Fix broken isEnumClassObject methods
Out of three methods, two were incorrect
2013-03-15 16:00:55 +04:00
Mikhael Bogdanov b3ec87f956 ClassObject instance field refactoring 2013-03-04 16:42:55 +04:00
Mikhael Bogdanov c61c8d7fa0 Compilation Exception - remove duplicated this on stack
#KT-3114 Fixed
2013-02-11 15:19:49 +04:00
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00