Denis Zharkov
2f2b1a7f80
Minor. Drop unused method
2016-07-15 18:59:33 +03:00
Denis Zharkov
4725dd3028
Implement recovery for incomplete expression before declaration
...
It's needed when declarations are parsed as a part of previous expression
(see tests)
Currently we apply this kind of recovery in a conservative way,
only when declaration starts at the next line, and while
the condition could be relaxed, there's no need to do this
#KT-4948 Fixed
#KT-7118 Fixed
2016-07-15 18:59:31 +03:00
Denis Zharkov
06a659e6e7
Minor. Invert boolean parameter meaning
...
It looks much more sensible to me
2016-07-15 18:27:01 +03:00
Denis Zharkov
fcb870a303
Add EOL to EXPRESSION_FOLLOW recovery set
...
This change is used in further commits, but it's extracted
to emphasize that testData modifications are caused by this.
2016-07-15 18:27:00 +03:00
Dmitry Jemerov
e224041760
show line markers for properties defined in the primary constructor (KT-12626)
2016-07-14 23:32:07 +02:00
Dmitry Jemerov
5201fc171b
ClsWrapperStubPsiFactory can be a singleton
2016-07-13 13:16:15 +02:00
Alexander Udalov
87387d030f
Minor, fix yellow code in OverrideResolver and OverridingUtil
2016-07-13 13:42:46 +03:00
Alexander Udalov
8f33830f29
Suppress UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS in several places
...
This is related to KT-6611 being fixed recently. Note that not all cases of
incorrect "cast never succeeds" were fixed
2016-07-13 13:42:42 +03:00
Alexander Udalov
13b0fda3c2
Fix AssertionError in DescriptorResolver#checkBounds
...
#KT-9620 Fixed
2016-07-13 13:42:39 +03:00
Denis Zharkov
b777b081b7
Increase SOURCE_STUB_VERSION and BINARY_STUB_VERSION in 1.1 on 50
...
Mostly because of type aliases and coroutines related changes
The reason why not just +1 is to avoid clashes between 1.0.x and 1.1
in cases when version must be increased in both branches
2016-07-13 13:19:11 +03:00
Denis Zharkov
bef7d5da2f
Increase SOURCE_STUB_VERSION
...
It's necessary because of changes in parser
(mostly recovery f1026935a0 )
2016-07-13 13:14:57 +03:00
Denis Zharkov
d88fc864e4
Revert "Use weak-reference based SLRU cache for module resolvers"
...
This reverts commit 28e33aaf56 .
Reverting is necessary because this change leads to complicated
exceptions, while it's usefulness is not that obvious.
#EA-82372 Fixed
2016-07-12 17:54:49 +03:00
Denis Zharkov
3845ea863c
Do not generate DefaultImpl method for MutableMap.remove(K;V)Z
...
#KT-13069 Fixed
2016-07-12 16:27:48 +03:00
Denis Zharkov
2d42ba23b3
Minor. Replace TraitImpl -> DefaultImpls, Trait -> Interface
...
There are still a lot of trait word entries in the source code,
only some of them got replaced here
2016-07-12 16:27:48 +03:00
Nikolay Krasko
57ef3f5656
Generate linenumber for goto instruction in while (KT-13059)
...
Otherwise linenumber for previous instruction will be used in debugger. That can lead to error stepping
because it might be line that isn't reachable on current iteration.
#KT-13059 Fixed
2016-07-12 15:19:02 +03:00
Nikolay Krasko
ce74d6c7df
Refactoring: invert if
2016-07-12 15:19:00 +03:00
Denis Zharkov
9fd78ac1ff
Temporary disable reflection test on Android
2016-07-12 12:52:03 +03:00
Denis Zharkov
18c2d3070d
Refine variables liveness analysis
...
Do not treat var as alive just because current instruction belongs to an item range
in local variables table, but the item has different sort of type
As liveness analysis is mostly used in coroutines spilling,
not applying this change may lead that to problems on Android (see tests)
2016-07-12 12:52:03 +03:00
Pavel V. Talanov
ae5659538b
Increase BINARY_STUB_VERSION
...
Should have been done after earlier changes: 022ef6410d6b18906156c43ef06215c726528880
2016-07-11 19:07:19 +03:00
Pavel V. Talanov
254ab72eb5
Put all stub versions into one place, explain their meaning
2016-07-11 19:07:16 +03:00
Denis Zharkov
7a9af072b4
Fix ClassCastException when data object is being analyzed
...
#KT-12687 Fixed
2016-07-10 15:04:32 +03:00
Michael Bogdanov
23a0e19620
Fix for KT-13040: Invalid bytecode generated for extension lambda invocation with safe call
...
#KT-13040 Fixed
2016-07-09 14:55:49 +03:00
Michael Bogdanov
93f6761671
Print bytecode on linenumber test fail
2016-07-09 07:45:57 +03:00
Michael Bogdanov
486aa5675f
Fix for KT-12908: Variable initialization in loop causes VerifyError bad local variable type
...
#KT-12908 Fixed
2016-07-09 07:45:57 +03:00
Dmitry Jemerov
00d651711a
fix incompatibility with ASM 6: don't call getReturnType() on a type which is not a method type (IDEA-158090)
2016-07-08 17:17:45 +02:00
Denis Zharkov
3aa1a56cb9
Extend recovery set when expecting property accessor
...
#KT-12987 Fixed
2016-07-08 16:06:47 +03:00
Denis Zharkov
f1026935a0
Add recovery for properties without name
...
If property name is parsed on the next line and declaration is invalid
(no receiver/type/initializer), treat that name as it does not belong to property
#KT-12987 In Progress
2016-07-08 16:06:47 +03:00
Denis Zharkov
141db1809f
Minor. Drop redundant AnnotationParsingMode
2016-07-08 16:06:47 +03:00
Denis Zharkov
36a7f31358
Minor. Extract parsePropertyDelegateOrAssignment
2016-07-08 16:06:47 +03:00
Denis Zharkov
4981b730ef
Minor. Cleanup KotlinParsing
...
- Remove unused field and commented code
- Add some comments
- jet -> kotlin
2016-07-08 16:06:47 +03:00
Denis Zharkov
bed6e312ae
Minor. Drop unreachable conditional branch
...
- allowShortAnnotations is true only for IN_ANNOTATION_LIST
- when starting parsing of annotation list we can't come to modifier list
(see the only usage of IN_ANNOTATION_LIST)
2016-07-08 16:06:47 +03:00
Denis Zharkov
46f11a5ec4
Add val/var tokens in parameter name recovery set
...
Recovery after val/var everywhere beside value parameters works
properly without this change
#KT-7915 Fixed
2016-07-08 16:06:47 +03:00
Dmitry Petrov
b0edec8449
KT-13023 Char operations throw ClassCastException for boxed Chars
...
Char is not a Number, so we can't use the same coercion strategy for Char members,
since it doesn't work for boxed Chars.
2016-07-08 10:26:04 +03:00
Dmitry Petrov
2ccb0caa6c
Minor: fix NPE in CallableMethod.toString for methods of primitive types
2016-07-08 10:26:04 +03:00
Dmitry Jemerov
88fe6680fa
use QualifiedNameResolver for resolving links in KDoc
...
#KT-10398 Fixed
2016-07-07 19:27:45 +02:00
Dmitry Jemerov
972ebd5fec
check that main() returns Unit
...
#KT-12760 Fixed
2016-07-07 18:01:42 +02:00
Dmitry Jemerov
30d721c458
MainFunctionDetector: cleanup after J2K
2016-07-07 18:01:41 +02:00
Dmitry Jemerov
b58c659e46
MainFunctionDetector: J2K
2016-07-07 18:01:40 +02:00
Dmitry Jemerov
b9a9f2504d
MainFunctionDetector: rename to .kt
2016-07-07 18:01:40 +02:00
Alexander Udalov
720c29e8f4
Minor, fix NonExistentClass name and format
2016-07-07 13:56:01 +03:00
Alexander Udalov
ceb54492e6
Get rid of CallChecker#checkPropertyCall, create fake ResolvedCall
2016-07-07 13:55:48 +03:00
Denis Zharkov
3a59e1d222
Support suspending extension functions
2016-07-06 15:25:19 +03:00
Denis Zharkov
2cc09f928e
Allow suspend extensions for specially annotated controllers
2016-07-06 15:25:19 +03:00
Denis Zharkov
30b4dfa65d
Minor. Make extension's receiver to be a type parameter and simplify usage
2016-07-06 15:25:19 +03:00
Dmitry Petrov
3445fe0d30
KT-12985 Do not create range instances for 'for' loop in CharSequence.indices
2016-07-06 12:50:41 +03:00
Dmitry Petrov
3dc23a0e02
KT-12983 java.lang.VerifyError: Bad type on operand stack in arraylength
...
Use proper receiver value type.
2016-07-06 09:59:00 +03:00
Michael Bogdanov
6b8e8cee17
Fix for KT-12891: Allow to omit type in local delegated property declaration
...
#KT-12891 Fixed
2016-07-05 21:22:48 +03:00
Alexander Udalov
191dfa1f2b
Minor, add test that language feature settings are used in local analysis
...
This test checks that the correct LanguageFeatureSettings instance (not
LanguageVersion.LATEST) is being passed to
createContainerForLazyLocalClassifierAnalyzer
2016-07-05 19:54:16 +03:00
Alexander Udalov
b557f9e712
Fix typo in inline property diagnostic message
2016-07-05 19:25:24 +03:00
Alexander Udalov
d331b6ae8e
Minor, move isInfixCall implementation out of InfixCallChecker
2016-07-05 19:23:21 +03:00