Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Alexander Udalov
6ec71b3fd1 Generate lambdas in enum entry super calls
#KT-4423 Fixed
2014-10-17 21:27:22 +04:00
Pavel V. Talanov
b2c288b62a Test super calls in enum literals 2014-10-10 18:12:56 +04:00
Pavel V. Talanov
8e6618920d Minor: rename test data file 2014-10-10 18:05:36 +04:00
Pavel V. Talanov
bb5998048f Test code generation for enum deriving from a trait 2014-10-10 17:43:33 +04:00
Alexander Udalov
e0ee890486 Move properties of enum class object to the enum class
Similar to how it's done for usual classes
2014-09-11 17:56:43 +04:00
Alexander Udalov
b52f337f7f Drop enum class object hack
Place valueOf() and values() into the static scope of the corresponding enum
class

 #KT-5580 Fixed
 #KT-2410 Fixed
2014-09-09 20:42:37 +04:00
Svetlana Isakova
9d366cb896 Prohibit local objects and enum classes
#KT-5402 Fixed
  #KT-4838 Fixed

Resolve type of object inside local object as special, not supertype('Any').
Changed visibility of constructor of anonymous object to 'internal' to be able to resolve the following:
fun box(): String {
    var foo = object {
        val bar = object {
            val baz = "ok"
        }
    }
    return foo.bar.baz
}
The containing declaration of property initializers is constructor, so 'baz' was invisible inside private constructor.
2014-09-01 12:32:52 +04:00
Alexander Udalov
3a0aac4857 Simplify type mapping logic in CodegenBinding
- inline asmType to calling getAsmType, which does something more
- refactor getJvmInternalName to use getAsmType as well
- simplify getAsmType and fix a probable bug in mapping singletons nested in
  enums (which wasn't reproduced, though a test is added)
- delete unnnecessary ASM_TYPE recording for enum entries in
  CodegenAnnotatingVisitor
2014-05-08 16:45:15 +04:00
Alexander Udalov
f7235e9d82 Fix abstract nested class in enums in JVM back-end
It caused InstantiationError because the enum had an incorrect ACC_ABSTRACT
flag
2014-04-24 16:10:13 +04:00
Alexander Udalov
5a1daaa4b6 Generate values()/valueOf() even for empty enums 2013-10-17 19:01:45 +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