Commit Graph

11133 Commits

Author SHA1 Message Date
Mikhail Glukhikh c4aa6d01a9 Exhaustive when on boolean argument. A set of tests.
Compile-time constants are taken into account. #KT-3743 Fixed.
2015-05-18 19:44:22 +03:00
Andrey Breslav df6c20efa4 KT-7689 Wrong error message format for type of ... doesn't match to the type of overridden var-property
#KT-7689 Fixed
2015-05-18 19:26:29 +03:00
Mikhail Glukhikh fdf0ea5546 Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries 2015-05-18 16:08:16 +03:00
Michael Bogdanov 58183731f5 Test for obsolete KT-5448: VerifyError with mismatched stack types
#KT-5448 Obsolete
2015-05-18 15:28:58 +03:00
Michael Bogdanov 5cb9671803 Support inlining in scripts and outer expression capturing
#KT-7744 Fixed
2015-05-18 14:47:57 +03:00
Michael Bogdanov 226350b4ba Test data fixed: replace trait with interface 2015-05-18 11:57:39 +03:00
Pavel V. Talanov 119ffd2347 Minor: replace obsolete trait keyword in newly added test 2015-05-17 18:24:50 +03:00
Pavel V. Talanov 268d43d14a Change ModuleContext#module type to ModuleDescriptor instead of ModuleDescriptorImpl 2015-05-17 18:24:50 +03:00
Pavel V. Talanov 01efbb1502 Introduce ModuleContext, ProjectContext and use it some of the APIs 2015-05-17 18:24:49 +03:00
Pavel V. Talanov 9d22a39924 Refactor: TopDownAnalysisParameters -> TopDownAnalysisMode
No longer implements TypeLazinessToken (was unused)
2015-05-17 18:24:49 +03:00
Pavel V. Talanov d9c70b5927 Drop TopDownAnalysisParameters#isAnalyzingBootstrapLibrary() 2015-05-17 18:24:48 +03:00
Pavel V. Talanov f9b6c25498 Refactor: TopDownAnalysisParameters doesn't implement GlobalContext 2015-05-17 18:24:47 +03:00
Ilya Gorbunov f18b9caa8d JS: Provide MIN_VALUE and MAX_VALUE member constants for Int, Long, Short and Byte companion objects.
JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Int, Long, Short and Byte companion objects.
2015-05-17 17:26:25 +03:00
Valentin Kipyatkov 617fe9b49d No duplicate "Expecting ')'" when parsing accessor 2015-05-16 17:15:16 +03:00
Valentin Kipyatkov 00fbf41bd8 More correct recovery after '.' in user type 2015-05-16 17:15:15 +03:00
Valentin Kipyatkov a05ffafc84 Added a test 2015-05-16 17:15:14 +03:00
Valentin Kipyatkov c94dc6d5f7 Better parsing of block after missing "->" after "else" in when 2015-05-16 17:15:14 +03:00
Valentin Kipyatkov 60b0236101 Corrected parser: incomplete code should never cause brace disbalance
Fixed KT-7539 fq name inserted when completing nested traits name

 #KT-7539
2015-05-16 17:15:12 +03:00
Valentin Kipyatkov 8ea0441348 KT-7349 Replace keyword "companion" in completion with "companion object" 2015-05-16 17:15:10 +03:00
Valentin Kipyatkov 833d474876 Smart completion when only named argument possible 2015-05-16 17:09:51 +03:00
Valentin Kipyatkov 67cfd9d516 KT-4909 Smart completion does not work for named arguments
KT-7668 Named argument completion does not work after vararg

 #KT-4909 Fixed
 #KT-7668 Fixed
2015-05-16 17:09:51 +03:00
Dmitry Jemerov dc9523016a report 'trait' keyword as deprecated, provide quickfix for replacing with 'interface' 2015-05-15 18:20:39 +02:00
Michael Nedzelsky 3dce96e01c JS: add tests for two libraries and js-file with two modules 2015-05-15 18:50:01 +03:00
Michael Bogdanov 5daf79d2de Tests for obsolete KT-5232: vfy error with default parameter in method of trait
#KT-5232 Obsolete
2015-05-15 18:06:52 +03:00
Michael Bogdanov f1eb68c55a Test for obsolete KT-3579: UsupportedOperationException while trying to compile recursive trait
#KT-3579 Obsolete
2015-05-15 18:06:52 +03:00
Michael Bogdanov eb8d2d695c Test for non-general case of KT-4174 2015-05-15 18:06:51 +03:00
Michael Bogdanov 576ead2afe Test for obsolete KT-3698: Static fields of primitive types and String must be compile-time constants
#KT-3698 Obsolete
2015-05-15 18:06:51 +03:00
Mikhail Glukhikh 4e1a90ee61 Diagnostics for incorrect enum members order, when enum entry follows enum member. A few diagnostic tests.
Now incorrect enum members order is treated as a warning.
2015-05-15 16:13:46 +03:00
Mikhail Glukhikh 983339e1c9 Detection of semicolon between enum entries together with the correct delimiter quick fix for this case.
Error message reported directly on semicolon.
2015-05-15 16:13:41 +03:00
Mikhail Glukhikh edd269f5ff Quick fix for enum entry delimiter syntax fix, together with a set of tests.
Possible NPE in getNextSiblingIgnoringWhitespace fixed. Some warnings also removed.
Last comma is replaced by semicolon. Comments are taken into account.
2015-05-15 16:13:39 +03:00
Mikhail Glukhikh da3d083dc0 Quick fix for enum entry super constructor syntax fix, together with a set of tests 2015-05-15 16:13:36 +03:00
Mikhail Glukhikh 147bca3d22 Enum deprecated syntax detection implemented and integrated into DeclarationsChecker.
A lot of tests was changed to refactor deprecated syntax. Six new tests were added to check deprecated syntax detection.
Diagnostic for "enum entry uses deprecated super constructor": constructor is highlighted
Diagnostic for "enum entry uses deprecated or no delimiter".
One warning removed.
2015-05-15 16:13:34 +03:00
Mikhail Glukhikh 1a312140e9 New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.
Grammar changed accordingly.
Semicolons prohibited after an entry except the last one.
Only one initializer is allowed per entry.
EnumReferenceExpression AST node introduced.
Some tests fixed, a pair of new tests written. Kotlin code inside project fixed.
Formatter and intendation tests fixed accordingly.
Stub version is incremented.
2015-05-15 16:13:32 +03:00
Mikhail Glukhikh cf741cb868 Enum parsing changed: first entries, then members. Grammar fixed accordingly.
A set of compiler tests and some plugin tests changed accordingly.
Compiler Kotlin code changed accordingly.
2015-05-15 16:13:27 +03:00
Nikolay Krasko 6b64ae77f3 Test light classes from sources have priority over decompiled light classes 2015-05-15 15:29:31 +03:00
Evgeny Gerashchenko 0498bd7739 KT-7587 Overloads are not generated during partial compilation of package
#KT-7587 fixed
2015-05-14 21:51:08 +03:00
Evgeny Gerashchenko ca883d8117 Green code. 2015-05-14 21:51:08 +03:00
Evgeny Gerashchenko 533935f2c0 KT-7472 function of anonymous class is never used
#KT-7472 fixed
2015-05-14 21:51:07 +03:00
Alexander Udalov 2fe05c6f11 Parse and resolve annotations on supertypes 2015-05-14 18:58:08 +03:00
Alexander Udalov 5539444aa2 Minor, fix runtime for compiler in CompilerSmokeTest 2015-05-14 18:40:50 +03:00
Alexander Udalov b881827b74 Use descriptors instead of PSI in ImplementationBodyCodegen 2015-05-14 18:40:48 +03:00
Natalia Ukhorskaya f20e76c185 Improve assert message.
#KT-6625 In Progress
2015-05-14 14:08:16 +03:00
Valentin Kipyatkov dc7f81a904 Code corrections after code review 2015-05-14 01:10:14 +03:00
Valentin Kipyatkov 841d07f1aa More correct fix of getEnclosingElementForLocalDeclaration( 2015-05-14 01:10:13 +03:00
Valentin Kipyatkov 181af17315 KT-7704 Intention actions on visibility modifier for quick changing it
#KT-7704 Fixed
2015-05-14 01:10:11 +03:00
Valentin Kipyatkov d95b198da7 Refactored (and more correct) getOutermostLastBlockElement and its usages 2015-05-14 01:10:10 +03:00
Valentin Kipyatkov 48ac89dca4 Refactored ConvertMemberToExtension to re-use original declaration instead of regenerating it by text
#KT-4920 Fixed
2015-05-14 01:10:02 +03:00
Valentin Kipyatkov 518ea85c87 Renames 2015-05-14 01:10:01 +03:00
Valentin Kipyatkov a3bd6ca017 Introduced shortcut properties + getArrowNode -> getArrow 2015-05-14 01:10:00 +03:00
Valentin Kipyatkov 8a30d2d664 Avoid creation expressions by texts 2015-05-14 01:09:57 +03:00