Commit Graph

13894 Commits

Author SHA1 Message Date
Michael Bogdanov b950bf0e6e Fix for KT-10259: Proguard can't find generated lambda class of lambda nested inside object?.let lambda
#Fixed KT-10259
2015-12-11 16:14:59 +03:00
Michael Bogdanov 9452c200a0 Keep typeRemapper in inlining context instead of hashMap for transformed types 2015-12-11 16:14:58 +03:00
Mikhail Glukhikh 6fb871a088 A set of additional tests for complex expressions DFA 2015-12-11 15:17:37 +03:00
Mikhail Glukhikh d024045638 Data flow values for Elvis / parenthesized expressions, smart casts on them 2015-12-11 15:17:29 +03:00
Mikhail Glukhikh 745a3aeeac Accurate representation of smart casts on complex expressions 2015-12-11 15:17:25 +03:00
Mikhail Glukhikh 7cd867b936 DFA: take into account if / else and when expression assignments #KT-10002 Fixed
Also #KT-7479 Fixed
2015-12-11 15:17:22 +03:00
Mikhail Glukhikh c8b50eec1e Enum.values: deprecation (warning) --> deprecation (error) 2015-12-11 11:11:42 +03:00
Mikhail Glukhikh 521b216602 Migration: Enum.values to Enum.values() 2015-12-11 11:11:38 +03:00
Mikhail Glukhikh 3254641c5a Local sealed classes: warning --> error 2015-12-11 11:11:34 +03:00
Dmitry Petrov 0fe74a8b43 COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT is an ERROR now.
Migrated code.
Updated test data in IDE tests.
Dropped whenWithRangeTestsAndMultiConditions.kt:
"Introduce subject" is not applicable to 'when' with ||-ed conditions.
2015-12-11 10:43:16 +03:00
Alexey Tsvetkov 199827635f Reserve 'typeof' as a keyword 2015-12-10 21:26:41 +03:00
Dmitry Jemerov 009e3f9cd7 rename PSI classes according to current terminology:
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Natalia Ukhorskaya 49e484d796 Do not throw exception analyzing imports in KtCodeFragments 2015-12-10 14:41:47 +03:00
Pavel V. Talanov 280e00981f Load java: load annotations on enum entries 2015-12-10 11:12:23 +03:00
Pavel V. Talanov fb19552920 Mark enum entries that are deprecated in Kotlin as deprecated in bytecode 2015-12-10 11:12:22 +03:00
Zalim Bashorov 5bf8b4d946 Allow to use "static" part of class in own constructors by short name, including in primary constructor 2015-12-09 21:42:32 +03:00
Mikhail Glukhikh 9a4eb2a368 Refactoring: ClassDescriptor.isFinal, no more Modality.isOverridable 2015-12-09 19:27:47 +03:00
Mikhail Glukhikh fb406bfc24 Refactoring: CallableMemberDescriptor.isOverridable 2015-12-09 19:27:04 +03:00
Mikhail Glukhikh c73f01927a 'sealed' is now not 'final' by default + related code changes #KT-10266 Fixed 2015-12-09 19:19:04 +03:00
Pavel V. Talanov da02ed9057 GroupingMessageCollector: ensure that messages without location are reported first
Should fix CompileKotlinAgainstCustomBinariesTest.testIncompleteHierarchyInJava(Kotlin) tests
2015-12-09 18:54:15 +03:00
Pavel V. Talanov 6164566cad Extract duplicate logic between javascript and builtins serialization/deserialization 2015-12-09 18:51:27 +03:00
Pavel V. Talanov e458534c93 Write package_fq_name to for Package message when serializing builtins 2015-12-09 18:51:24 +03:00
Pavel V. Talanov f05de6d6eb Add package_fq_name field extension to builtins.proto 2015-12-09 18:51:24 +03:00
Dmitry Petrov 70c200d265 Fix diagnostic messages for properties.
Fix IDE tests.
Update quick fixes in IDE
(TODO: review new inheritance-related diagnostics with regards to quick fixes)
2015-12-09 17:43:48 +03:00
Dmitry Petrov 94bea54db3 Change "most specific return type" definition for fake overrides.
Given overridden descriptors D = d[i].
1. Find D*, subset of D:
  returnType(d* from D*) <: returnType(d) for each d from D.
  Always prefer var to val.
2. Prefer non-flexible return type to flexible.

Check for var/val overrides properly
(NB: this will report PROPERTY_TYPE_MISMATCH_ON_OVERRIDE
for all properties, not just overrides involving vars as it was before).
2015-12-09 17:43:48 +03:00
Dmitry Petrov 594039ac42 Delegation and overrides:
- Tests.
- No need for a separate diagnostic message regarding
return/property type conflict on override by delegation:
it is always a conflict of inherited signatures.
2015-12-09 17:43:48 +03:00
Dmitry Petrov 84824b1024 Fix KT-10194: skip incorrect delegates. 2015-12-09 17:43:48 +03:00
Dmitry Petrov ef72c594c4 KT-1934 & KT-10197:
Naive approximation for fake overriding signature:
use upper bound for flexible types.
Check delegation errors.
2015-12-09 17:43:47 +03:00
Dmitry Petrov 6e2d42daf9 J2K: DelegationResolver.kt: convert to Kotlin 2015-12-09 17:43:47 +03:00
Dmitry Petrov 8f5df45edc J2K: DelegationResolver.kt 2015-12-09 17:43:47 +03:00
Dmitry Petrov 2fcb7e532b KT-1934: Fixing synthetic accessors hierarchy 2015-12-09 17:43:47 +03:00
Dmitry Petrov 135c30323b KT-1934 Check inherited signatures for compatibility
Overridden signatures should have compatible return types
(equal types for 'var').
Only relevant overrides should be taken into account.
Refactor inherited signatures check,
introduce a strategy interface for problem reporting.
2015-12-09 17:43:47 +03:00
Dmitry Jemerov 18e343d405 Merge pull request #795 from mcgee/KT-10124
#KT-10124 Fixed
2015-12-09 15:28:31 +01:00
Dmitry Jemerov 863e32c5cd Merge pull request #791 from mcgee/KT-9938
#KT-9938 Fixed
2015-12-09 15:17:31 +01:00
Andrey Breslav 3eeab68261 Signature checks fixed for plus() and minus() 2015-12-09 17:10:30 +03:00
Andrey Breslav 421f84e05a Error messages fixed for deprecations that have been made errors 2015-12-09 17:10:30 +03:00
Andrey Breslav 434082cadb 'yield' reserved as a keyword 2015-12-09 17:10:30 +03:00
Nikolay Krasko 3374ac7606 Minor: More tests for warnings suppression 2015-12-09 16:01:52 +03:00
Dmitry Jemerov e97e82d119 use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression" 2015-12-09 13:55:40 +01:00
Alexander Udalov 9a01c0d9cb Test that no delegated properties are used in critical classes in reflection 2015-12-08 22:59:00 +03:00
Stanislav Erokhin cfed28c2ff Use CastImplicitClassReceiver for implicit this with smart cast 2015-12-08 20:42:55 +03:00
Stanislav Erokhin b7e4fdf4d5 Add extensionReceiver to ScopeTowerLevel & use it in ImportingScopeBasedTowerLevel 2015-12-08 20:42:55 +03:00
Dmitry Jemerov 57b5588498 rename "Jet" to "Kotlin" in CFG classes 2015-12-08 16:54:09 +01:00
Stanislav Erokhin 10a13e737e Minor. Add isComputing to DeferredType 2015-12-08 17:29:55 +03:00
Stanislav Erokhin 11410000b4 Minor. Do not resolve implicit invoke for callable reference 2015-12-08 17:29:55 +03:00
Stanislav Erokhin 859a8adc31 Fix priority for functions without infix or operator modifier 2015-12-08 17:29:54 +03:00
Stanislav Erokhin 64b101785f Minor. Introduce util function 2015-12-08 17:29:54 +03:00
Alexey Sedunov 5c88a1c63e Inline Variable: Parenthesize arguments of the form "e1 < e2" if the next argument has the form "e1 > e2"
#KT-8261 Fixed
2015-12-08 16:21:07 +03:00
Alexey Sedunov b2bdb8ed02 Inline Variable: Inline string template entries
#KT-7654 Fixed
2015-12-08 16:21:05 +03:00
Alexey Sedunov 0af2243245 J2K: KotlinInlineValHandler (conversion and refactoring) 2015-12-08 16:21:03 +03:00