Commit Graph

13109 Commits

Author SHA1 Message Date
Alexander Udalov dab9d69a40 Don't show bytecode for files out of source roots (EA-50793) 2013-12-04 15:19:57 +04:00
Alexander Udalov 4aa6a42483 Support codegen of empty for-loop
#KT-3009 Fixed
 EA-35742 fixed
2013-12-04 15:19:56 +04:00
Alexander Udalov 61ff9eb45b Support codegen of empty do-while-loop
#KT-3009 In Progress
2013-12-04 15:19:56 +04:00
Alexander Udalov 9058272528 Support codegen of empty while-loop
#KT-3009 In Progress
2013-12-04 15:19:56 +04:00
Alexander Udalov 4cd4026174 Support empty if-statements
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data
flow info out of its condition

 #KT-2478 Fixed
2013-12-04 15:19:47 +04:00
Alexander Udalov f045a06dee Update to IDEA 133.193 EAP 2013-12-03 19:00:48 +04:00
Alexander Udalov dfd660a8e3 Try to resolve expression as class object if resolution found an inappropriate result 2013-12-03 19:00:44 +04:00
Alexander Udalov b8a97bf192 Minor, fix typo 2013-12-03 18:59:52 +04:00
Nikolay Krasko 1675e45aee Enable basic spell check for Kotlin
#KT-4272 Fixed
2013-12-02 20:28:38 +04:00
Alexander Udalov d6e1af645f Upgrade ABI version after objects refactoring 2013-12-02 19:56:17 +04:00
Alexander Udalov 076cb07ace Update built-ins test data after objects refactoring 2013-12-02 19:56:17 +04:00
Alexander Udalov 9465fb22d3 Delete unused method from JetClassLikeInfo 2013-12-02 19:56:16 +04:00
Alexander Udalov 969d81b43b Drop deprecated INLINE flag from binary format 2013-12-02 19:56:16 +04:00
Alexander Udalov 310a70bf84 Report a separate diagnostic on inheritance from singletons 2013-12-02 19:56:16 +04:00
Alexander Udalov 2c2e212d0a Don't allow to call constructors of singletons
This fixes testKt2014
2013-12-02 19:56:16 +04:00
Alexander Udalov 080bd42f88 Allow singletons and functions with the same name 2013-12-02 19:56:15 +04:00
Alexander Udalov dcedbed7e1 Minor, inline DescriptorUtils.getEnumEntriesScope 2013-12-02 19:56:15 +04:00
Alexander Udalov 8549cbb510 Minor, make field final 2013-12-02 19:56:15 +04:00
Alexander Udalov c2598faa4e Fix class object visibility check
ExpressionTypingContext now has a scope for visibility checking, which isn't
replaced on replaceScope()
2013-12-02 19:56:15 +04:00
Alexander Udalov d82e8b9a35 Minor, use ExpressionTypingContext in CallExpressionResolver
Will be needed to use expression-typing-specific things
2013-12-02 19:56:14 +04:00
Alexander Udalov 49f8f0af92 Fix highlighting for objects and enum entries
JetObjectDeclarationName is now highlighted with KOTLIN_CLASS
2013-12-02 19:56:14 +04:00
Alexander Udalov 92cdb0b6e7 Fix imports from objects
This almost reverts 345ecbf, since now properties are no longer created for
objects
2013-12-02 19:56:13 +04:00
Alexander Udalov dce9fbb91c Report a proper error on class object in enum entry or object
CLASS_OBJECT_NOT_ALLOWED instead of MANY_CLASS_OBJECTS
2013-12-02 19:56:13 +04:00
Alexander Udalov 2e4807856f Don't create NamespaceType for enum entries
Enum entry expressions have the type of their enum, so it shouldn't be possible
to access static nested classes of enum entries from outside.

This fixes BlackBoxCodegenTestGenerated$CallableReference.testEnumNameMethod
2013-12-02 19:56:13 +04:00
Alexander Udalov e48c91bba4 Fix find usages classification for objects
Objects/enum entries are treated as variables as before. Test data for private
object in superclass was changed because now the object (as opposed to the
property) is no longer resolved due to KT-354
2013-12-02 19:56:13 +04:00
Erokhin Stanislav ddda69c0a6 JS Backend: hack nested object access 2013-12-02 19:56:12 +04:00
Alexander Udalov 97ad75a9f9 JS Backend: fix tests after object refactoring 2013-12-02 19:56:12 +04:00
Alexander Udalov ba693d3e38 Delete nested_object_name from binary format
It's useless now: nested objects are stored along with classes
2013-12-02 19:56:12 +04:00
Alexander Udalov 4526d96186 Delete JetScope.getObjectDescriptor() 2013-12-02 19:56:11 +04:00
Alexander Udalov 550df37056 Delete JetScope.getObjectDescriptors() 2013-12-02 19:56:11 +04:00
Alexander Udalov 31c84951dc Fix objects appearing in type position in completion
After the object refactoring they're present as classes in scopes, not as
object descriptors
2013-12-02 19:56:11 +04:00
Alexander Udalov 9e6cc829fb Delete WritableScopeImpl.addObjectDescriptor() 2013-12-02 19:56:10 +04:00
Alexander Udalov c2c4123f64 Don't store object descriptors separately in lazy member scope
Object descriptors are refactored to be the usual classes, so the scope can't
contain any 'objects'
2013-12-02 19:56:10 +04:00
Alexander Udalov 9890f2e5ac Simplify CodegenBinding.canHaveOuter(), make it work for objects
This fixes CompileKotlinAgainstKotlinTest
2013-12-02 19:56:10 +04:00
Alexander Udalov 90490b5c0c Delete OBJECT_DECLARATION_NAME slice and relevant usages
JetObjectDeclarationName is almost useless now, since properties aren't created
for objects anymore
2013-12-02 19:56:10 +04:00
Alexander Udalov 0792af5f85 JetObjectDeclarationName is no longer JetDeclaration
Fix lazy resolve descriptor renderer tests after object refactoring
2013-12-02 19:56:09 +04:00
Alexander Udalov f0e230cf23 Fix test data of recursive processor and renderer
After object refactoring
2013-12-02 19:56:09 +04:00
Alexander Udalov c6cfeec6fc Delete VariableDescriptorForObject 2013-12-02 19:56:09 +04:00
Alexander Udalov e3fffa6b0b Fix decompiled data for objects and enum entries
Also prettify it for enum entries: output only names
2013-12-02 19:56:09 +04:00
Alexander Udalov ce481b08d8 Fix CompileKotlinAgainstCustomBinariesTest
The two cases are almost irrelevant now that objects aren't resolved to
properties anymore
2013-12-02 19:56:08 +04:00
Alexander Udalov cb6c98d4d6 Delete OBJECT_PROPERTY kind from binary format
We never create properties for objects anymore, except enum entries of Java
enums. Delete PropertyDescriptorForObjectImpl and its usages
2013-12-02 19:56:08 +04:00
Alexander Udalov 42839fa061 Delete LoadKotlinCustomTest
It's useless now because enums are loaded the same way from binaries as well as
from sources
2013-12-02 19:56:08 +04:00
Alexander Udalov dd290bbeb9 Create classes when deserializing enum entries 2013-12-02 19:56:07 +04:00
Alexander Udalov bd5eee5cc2 Put enum entries into enum in lazy resolve 2013-12-02 19:56:07 +04:00
Alexander Udalov 5a4cc1e2fe Put enum entries into enum class in JDR 2013-12-02 19:56:07 +04:00
Alexander Udalov 60e7722a82 Enum entries are put into enum class, not its class object 2013-12-02 19:56:06 +04:00
Alexander Udalov a5d6d6719c EnumValue now has a ClassDescriptor for its enum entry 2013-12-02 19:56:06 +04:00
Alexander Udalov 83ef095093 Change enum entry resolution strategy in JDR
Enum entry is now resolved into a class with a class object, which inherits
from the former class, as in the other parts of the compiler. Create a special
class EnumEntrySyntheticClassDescriptor which will be reused in deserialization
later
2013-12-02 19:56:06 +04:00
Alexander Udalov 57678a5506 Fix AnnotationDescriptorResolveTest, objects are now classes in scopes 2013-12-02 19:56:06 +04:00
Alexander Udalov 6f930ef725 Support updated enum entry hierarchy in JVM codegen 2013-12-02 19:56:05 +04:00