Commit Graph

27546 Commits

Author SHA1 Message Date
Valentin Kipyatkov 2b3694a77e Do not drop use of SAM-constructor when it's required for labeled return 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov 34298190b3 Use unaryPlus() and unaryMinus() instead of plus() and minus() + no identityEquals() 2015-10-30 17:25:35 +03:00
Valentin Kipyatkov c5e13ebc68 Minor corrections on code review 2015-10-30 17:25:34 +03:00
Michael Bogdanov 7ee42ab18d Fix for KT-9828: DX error on MutableMap.MutableEntry<String, Int> deconstruction: attempt to set or access a value of type java.lang.Object using a local variable of type int.
#KT-9828 Fixed
2015-10-30 16:47:21 +03:00
Michael Nedzelsky 9a8b73c5a5 fix texts in error messages for Fintite Bound Restriction & Non-Expansive Inheritance Restriction 2015-10-30 16:39:19 +03:00
Mikhail Glukhikh 182cde1e02 Standard data flow analysis results are taken into account during condition analysis #KT-7933 Fixed 2015-10-30 16:14:34 +03:00
Mikhail Glukhikh dd1196ae6b Condition analysis: left part of and (true condition) / or (false condition) is used for right part analysis #KT-8780 Fixed 2015-10-30 16:14:33 +03:00
Mikhail Glukhikh 12103d19d2 Smart casts inside property chains like a?.b?.c.foo(a, b) are now handled correctly #KT-7290 Fixed 2015-10-30 16:14:32 +03:00
Natalia Ukhorskaya 8be9be336f Fix NPE on stepping
#KT-9821 Fixed
2015-10-30 14:53:06 +03:00
Natalia Ukhorskaya e1e845cef1 Fix conditional breakpoints 2015-10-30 14:53:06 +03:00
Michael Nedzelsky 3c855547e5 improve tests for access from tests to internal for maven and gradle (add override for internal function) 2015-10-30 14:42:44 +03:00
Michael Nedzelsky 6ebe0c30ec fix KT-9299 In a project with circular dependencies between modules, IDE reports error on use of internal class from another module, but the corresponding code still compiles and runs.
#KT-9299 Fixed
2015-10-30 14:40:46 +03:00
Mikhail Glukhikh 17b275af23 Preliminary declaration visitor: create for top-most declaration which is not class 2015-10-30 13:44:33 +03:00
Mikhail Glukhikh 932985f0c1 Preliminary declaration visitor: do not create if already exists 2015-10-30 13:34:01 +03:00
Valentin Kipyatkov 44e56c4b93 Correct scope declarations in completion for code fragments 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov 5a69a17ab0 Minor 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov 40d3f71e1a Temporary fix for completion of Android synthetic extensions 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov 129f6f8532 Big refactoring of BasicCompletionSession 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov 8b38d8d7b9 No top-level packages after "::" 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov 46b9879c47 Added test 2015-10-30 12:03:53 +03:00
Valentin Kipyatkov f44bbc375c Code refactoring + put named arguments completion into more reasonable order 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov 4c6f6c2a2e Minor refactoring: excludeNonInitializedVariable() moved into ReferenceVariantsHelper 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov 2e80a7194c Minor performance optimization 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov 4ab2019da4 Competion in debugger for runtime receiver type should not show members grayed 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov af441d32b1 Minor corrections to "compareDescriptors" but still lot of question to its implementation and semantics 2015-10-30 12:03:52 +03:00
Valentin Kipyatkov 582443ea7b More efficient filtering of runtime receiver type variants in debugger 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov 3e3d86aebb A little bit more correct filtering 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov 0ee2b512ff Completion of non-imported extensions in debugger for runtime receiver type 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov c9048266c8 Fixed extensions completion for runtime receiver type in debugger (broken by previos changes in extensions completion) 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov a26f6da12d Do not filter out synthetic extensions (if they will ever exist in future) 2015-10-30 12:03:51 +03:00
Valentin Kipyatkov 9feed9c3ef Fixed filtering of shadowed declarations after changes in extensions treatment 2015-10-30 12:03:50 +03:00
Valentin Kipyatkov be5569d31a Performance optimization in completion: do not analyze all extensions available from imports - use index 2015-10-30 12:03:50 +03:00
Michael Bogdanov 9f9217b9c3 Test for obsolete KT-9642
#KT-9642 Obsolete
2015-10-30 09:39:11 +03:00
Michael Bogdanov f3092bf390 Fix for KT-9637: Runtime crash when using class literal in inline functions with reified type parameters
#KT-9637 Fixed
2015-10-30 09:39:10 +03:00
Michael Bogdanov 34fccc6dae Fix for KT-6990: inline reified doesn't inline call in some cases
#KT-6990 Fixed
2015-10-30 09:39:09 +03:00
Michael Bogdanov 33bf314518 Fix for KT-6552 IllegalAccessError in inline function with "when" over enum across modules
#KT-6552 Fixed
2015-10-30 09:39:09 +03:00
Michael Bogdanov 9e5af43ce1 Fix for KT-9788: AssertionError from back-end when we read field from inline function
#KT-9788 Fixed
2015-10-30 09:39:08 +03:00
Alexander Udalov 7046f63511 Move/inline stuff from TypeUtils to other modules 2015-10-29 21:16:07 +03:00
Alexander Udalov 5677ff60e7 Move/inline stuff from DescriptorUtils to other modules 2015-10-29 21:16:06 +03:00
Alexander Udalov 2c64848826 Don't swallow exception in KotlinBuiltIns, assert instead
See 16b6bcc

 #KT-9820 Open
2015-10-29 21:16:05 +03:00
Alexander Udalov 4d909d9012 Move LexicalScope to frontend 2015-10-29 21:16:05 +03:00
Alexander Udalov 09a36acee4 Minor, remove HTML from kdoc 2015-10-29 21:16:04 +03:00
Denis Zharkov 9b29181878 Minor. Add Kotlin overrides to test
#KT-6733 Obsolete
2015-10-29 21:05:52 +03:00
Denis Zharkov 7eed041a7a Use original descriptor when obtaining source 2015-10-29 21:05:52 +03:00
Denis Zharkov 5755af6b27 Remove wrong condition part: there could be irrelevant overrides from Kotlin 2015-10-29 21:05:52 +03:00
Denis Zharkov 291f0e57d1 Introduce FunctionDescriptor.initialSignatureDescriptor
Mostly it's needed for backend to extract descriptor with initial signature

For example:
class A implements CharSequence {
        char charAt(int index) {}
}

We see `charAt` this method as `fun get(index: Int): Char`, but in backend it
matters what signature had this descriptor before.
2015-10-29 21:05:51 +03:00
Denis Zharkov 95d12260c1 Fix project sources after latter changes
ResolveSession is inherited from two interfaces:
1. The one written in Java with 'getModuleDescriptor'
2. And the second one in Kotlin with property 'moduleDescriptor'

Now we treat such declarations from supertypes like they are just plain
property accessor overrides, and 'getModuleDescripton' and it's friends
becomes invisible via ResolveSession
2015-10-29 21:05:51 +03:00
Denis Zharkov 94803ce1c4 Collect overrides of special builtin members in super types
#KT-9695 Fixed
2015-10-29 21:05:26 +03:00
Denis Zharkov 060178e53f Minor. Convert extension to common function 2015-10-29 18:41:51 +03:00
Denis Zharkov 50125f612e Unify creation of special builtin functions
Create all of them --- both renamed and with de-erased signature ---
within 'computeNonDeclaredFunctions'.

This helps to get rid of open 'resolveMethodToFunctionDescriptor'
and guarantees that method inside 'isVisibleAsFunction'
is always without any magic.
2015-10-29 18:41:51 +03:00