Commit Graph

22712 Commits

Author SHA1 Message Date
Georgy Bronnikov dbfbfa65a6 Remove IrClass.isFileClass as unneeded 2018-11-07 19:09:15 +03:00
Georgy Bronnikov a814e4a314 IR. Remove ClassLowerWithContext
The code is never used and shows some signs of bit rot.
2018-11-07 19:09:15 +03:00
Georgy Bronnikov 1aec16ca29 JVM_IR. Remove FileClassDescriptor, no longer used 2018-11-07 19:09:15 +03:00
Georgy Bronnikov 0a43054a92 JVM_IR. Remove descriptors from FileClassLowering 2018-11-07 19:09:15 +03:00
Georgy Bronnikov 95fbe29350 JVM_IR: remove descriptors from JvmCoercionToUnitPatcher 2018-11-07 19:09:15 +03:00
Dmitry Petrov 1523185734 KT-27948: Use proper KotlinType when comparing with literal 0
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov e14f74bc18 KT-27948: Properly coerce values when generating areEqual call
#KT-27948
2018-11-07 18:17:29 +03:00
Dmitry Petrov ac7cc0c08e KT-27706: Dispatch receiver type for constructor accessor is Object 2018-11-07 18:17:29 +03:00
Dmitry Petrov ea4afdaebe KT-27705: Use proper types for captured outer class instance
Call typeMapper only if we have an inline class.
2018-11-07 18:17:29 +03:00
Mikhael Bogdanov 60986293bf Minor. Use until in for iterator 2018-11-07 15:42:58 +01:00
Mikhael Bogdanov d2a205c72d Update synthetic parameter processing logic according to ASM 7 changes
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Simon Ogorodnik aa8031691e Fix picocontainer version 2018-11-07 15:16:39 +03:00
Toshiaki Kameyama 0fcd1a2072 Introduce "Delegate to 'var' property" inspection #KT-26724 Fixed 2018-11-07 13:59:00 +03:00
Alexander Udalov 17d740a373 Do not try computing return type in OverloadChecker
Return type is not needed for checking overloads, but querying it may
involve resolving function bodies, which usually happens after overload
checking (see LazyTopDownAnalyzer.analyzeDeclarations) and at this point
can lead to incorrect BACKING_FIELD_REQUIRED value being computed for
some properties (see KT-27895)

 #KT-27895 Fixed
2018-11-07 11:00:15 +01:00
Anton Bannykh 829bdf6061 JS: fix noInline version of inline suspend fun (KT-27611 fixed) 2018-11-07 12:34:00 +03:00
Anton Bannykh 59009430e5 JS: report inline suspend functions to IC
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Dmitry Savvinov 939b58f8f4 Fix testdata to incorrect to keep local testruns green
This test was originally written with fix for KT-22379

Lately, fix was proven to be wrong and reverted (KT-27084), which made
this test fail.

Correct solution here would be to mute test with link to YT issue, but
unfortunately we don't have infrastructure to mute tests locally (yet),
which is a major issue because this tests is a part of very popular for
local smoke-testing test suite (DiagnosticTestsGenerated).
2018-11-06 19:29:28 +03:00
Nikolay Krasko 6dcc3374fe Get string entries from stubs (KT-23738) 2018-11-06 13:43:23 +03:00
Nikolay Krasko 359e16eb82 Get argument name from stubs if possible (KT-23738) 2018-11-06 13:43:22 +03:00
Nikolay Krasko 3f53f9d9fb Allow storing dot qualified expression in annotations arguments (KT-23738) 2018-11-06 13:43:21 +03:00
Nikolay Krasko a794d26493 Get stubbed expressions in value arguments (KT-23738) 2018-11-06 13:43:20 +03:00
Nikolay Krasko a9c3b27d3e Don't generate stub for value arguments list when no arguments present (KT-23738)
Need this to conform stubs list obtained by decompiler.
Also ignore green stub, because is might not contain actual psi node.
2018-11-06 13:43:19 +03:00
Nikolay Krasko efa59bfc7e Make stubs for string entries (KT-23738) 2018-11-06 13:43:17 +03:00
Nikolay Krasko 37d7e618da Stub element for KtStringTemplateExpression (KT-23738) 2018-11-06 13:43:16 +03:00
Nikolay Krasko 11543ba897 Make possible store constant values in stubs (KT-23738) 2018-11-06 13:43:15 +03:00
Nikolay Krasko d9bc512556 Put arguments name to stubs in annotations (KT-23738) 2018-11-06 13:43:14 +03:00
Nikolay Krasko 12f127d631 Add stub for annotations value arguments (KT-23738) 2018-11-06 13:43:13 +03:00
Nikolay Krasko fbb0e7d927 Stubbed VALUE_ARGUMENT_LIST and store it for annotations (KT-23738) 2018-11-06 13:43:12 +03:00
Nikolay Krasko 0f0dfe725e Refactoring: move KtExpression.unpackFunctionLiteral to utils file 2018-11-06 13:43:10 +03:00
Nikolay Krasko 7c49eeded7 Make KtProperty.getInitializer() use stub check 2018-11-06 13:43:09 +03:00
Nikolay Krasko 4f52f62b44 Use stubs in KtProperty for getDelegate() and getDelegateExpression() 2018-11-06 13:43:08 +03:00
victor.petukhov 9a61998fca Add lexer test runner and whitespace characters tests
Whitespace characters for the tests are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
2018-11-06 11:19:15 +03:00
victor.petukhov fe072e3366 Fix the lack of the handling of whitespace characters in the KDoc lexer
Affected characters are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
This problem reproduces with JFlex since 1.5.0: http://jflex.de/changelog.html#jflex-1.5.0-jan-21-2014
2018-11-06 11:18:58 +03:00
victor.petukhov 9e6ac6cb2a Fix the lack of the handling of whitespace characters in the Kotlin lexer
Affected characters are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
This problem reproduces with JFlex since 1.5.0: http://jflex.de/changelog.html#jflex-1.5.0-jan-21-2014
2018-11-06 11:18:38 +03:00
Mikhail Glukhikh 631adde3f5 Regenerate FIR resolve tests 2018-11-02 19:44:56 +03:00
Mikhail Glukhikh 2bc063b230 FIR: implement default star importing scope 2018-11-02 19:44:56 +03:00
Mikhail Glukhikh 284b21b2a6 Get rid of descriptors, resolved classifiers, + some cleanup 2018-11-02 19:44:55 +03:00
Mikhail Glukhikh 8035be07e2 FIR: built-in resolve, preliminary version #KT-24091 Fixed 2018-11-02 19:44:55 +03:00
Mikhail Glukhikh ce113fbe2e FIR: introduce class & type alias symbols 2018-11-02 19:44:55 +03:00
Mikhail Glukhikh 093a236e34 FIR resolve: support star imports, enum entries 2018-11-02 19:44:55 +03:00
Mikhail Glukhikh 929573e0d5 FIR type transformer: minor optimization: do not create empty scopes 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh dfa8c32c5d FIR: minor cone types refactoring 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh 4d48c40832 FIR tree & builder: support expect / actual 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh d16303342e FIR: do not allow to resolve to type parameters in supertype position 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh e46074dee6 FIR: simplify type parameter scopes 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh 9aaec1efda FIR: resolve function type parameters 2018-11-02 19:44:54 +03:00
Simon Ogorodnik 25ae12fe07 FIR: implement early type alias expansion 2018-11-02 19:44:54 +03:00
Mikhail Glukhikh d15fb1963b FIR: introduce symbols + type parameter resolve #KT-24064 Fixed 2018-11-02 19:44:53 +03:00
Mikhail Glukhikh 3495f09ac4 Fix visiting of resolved FIR nodes 2018-11-02 19:44:53 +03:00
Mikhail Glukhikh a99578c354 FIR: handle unresolved modality as questionable 2018-11-02 19:44:53 +03:00