Commit Graph

59989 Commits

Author SHA1 Message Date
Mikhail Glukhikh 684bdc44bb FIR: add implementation of reified type parameter references
This adds support of T::class.java for reified type parameters
2019-12-17 17:28:01 +03:00
Mikhail Glukhikh cccb95465e FIR status resolve: update type alias phase
This prevents repeating of this phase for aliases
2019-12-17 17:28:00 +03:00
Mikhail Glukhikh a6b6c9ba18 Minor: remove when unreachable branches 2019-12-17 17:28:00 +03:00
Mikhail Glukhikh af3ab9178a Minor: remove unused imports 2019-12-17 17:27:59 +03:00
Roman Golyshev 8e53ccb852 Add ML completion jar to the resulting plugin jar
- Without it, ML completion jar will not be present in the runtime, causing errors when ML completion is enabled
- This step should have been done in 28ec74648e commit
2019-12-17 16:33:20 +03:00
Georgy Bronnikov e92985458b JVM_IR: skip private declarations in imported classes 2019-12-17 15:53:29 +03:00
Igor Chevdar 776736a25a [IR] Remapped some forgotten types during IR copying 2019-12-17 15:48:56 +03:00
Svyatoslav Kuzmich f099277210 [JS IR] Unmute tests and add KJS_WITH_FULL_RUNTIME 2019-12-17 15:33:43 +03:00
Svyatoslav Kuzmich e32ec2a789 [JS IR BE] Support typeOf 2019-12-17 15:33:43 +03:00
Svyatoslav Kuzmich 3df8393ede [JS IR] Properly report compiler errors
Report compiler errors using message collector
Instead of crashing with stack trace
2019-12-17 15:33:43 +03:00
Nikolay Krasko ea8fa55f12 Rename kotlinJUnitSettings test data folder to fix tests 2019-12-17 15:09:50 +03:00
Denis Zharkov 2aa1c40de4 Avoid checking trivial incorporated constraints 2019-12-17 15:06:17 +03:00
Denis Zharkov 02f3cedcf4 FIR: Optimize ConeInferenceContext::typeDepth 2019-12-17 15:06:17 +03:00
Denis Zharkov b53c00cf69 FIR: Optimize simple things in inference 2019-12-17 15:06:17 +03:00
Mikhael Bogdanov 03c2350e79 Keep original casts during reification to avoid VerifyError
#KT-26435 Fixed
2019-12-17 12:41:22 +01:00
Igor Chevdar 6f16d02920 [gradle-native-plugin] Build static caches instead of dynamic 2019-12-17 14:37:34 +03:00
Ilmir Usmanov b6de3c2fcc Disable tail-call optimization for suspend functions with Unit return type
if it overrides functions with another return type.
Otherwise, we cannot determine on call site that the function returns Unit
and cannot { POP, PUSH Unit } in order to avoid the situation when callee's
continuation resumes with non-unit result. The observed behavior is that
suspend function, which should return Unit, suddenly returns other value.
 #KT-35262: Fixed
2019-12-17 12:08:35 +01:00
Dmitry Gridin 09acdb655d KtScratchExecutionSession: fix compilation for 191 2019-12-17 17:54:36 +07:00
Dmitry Gridin 898308c7ba KotlinDebuggerCaches: fix INRE
#EA-219472 Fixed
2019-12-17 17:20:36 +07:00
Dmitry Gridin 3f500c6e92 KotlinConsoleRunner: fix INRE
#EA-219478 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 02beb72ab1 IDEKotlinAsJavaSupport: fix INRE
#EA-213321 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 4d7fe78a51 KotlinFunctionBreakpoint: fix INRE
#KT-35316 Fixed
#EA-219418 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 09bcfab047 KotlinNativeModuleConfigurator: fix INRE
#EA-219416 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 86f9253fa0 KtScratchExecutionSession: fix INRE
#EA-218701 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 78f7ed2c27 KotlinVariableInplaceIntroducer: fix PIEAE
#EA-209820 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 580885245d JavaToKotlinAction: fix KNPE
#EA-215300 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 34dcc72e7f idea: fix some ControlFlowException
#EA-219412 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin cdabff1941 KotlinImportOptimizer: should use with isIndeterminate=false
#KT-34928 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin 7c9826b60b PerModulePackageCacheService: fix NPE for code injection
#KT-35208 Fixed
2019-12-17 17:20:35 +07:00
Dmitry Gridin ebf3bfc048 KotlinIntroduceImportAliasHandler: remove unnecessary transformations 2019-12-17 17:20:34 +07:00
Mikhail Glukhikh 9f1f743d55 FIR: fix test data after Make 'statics visible from nested classes' 2019-12-17 12:24:14 +03:00
Toshiaki Kameyama 7b1771d432 Remove braces from 'when' entry: do not suggest when statement is lambda that has no arrow
#KT-35288 Fixed
2019-12-17 11:20:36 +03:00
Toshiaki Kameyama afc680d5c9 JavaMapForEachInspection: do not report when lambda parameter is destructuring declaration
#KT-34511 Fixed
2019-12-17 11:18:27 +03:00
Toshiaki Kameyama 8857827dce "Add not-null asserted (!!) call": do not add this when implicit receiver is not extension receiver
#KT-34894 Fixed
2019-12-17 11:15:53 +03:00
Toshiaki Kameyama f1c605d0f7 AddFunctionParametersFix: improve parameter name for 'it' argument
#KT-33297 Fixed
2019-12-17 11:10:15 +03:00
Toshiaki Kameyama f8f50b2131 DeprecatedCallableAddReplaceWithInspection: add argument name if needed
#KT-34297 Fixed
2019-12-17 11:04:50 +03:00
Toshiaki Kameyama 23749bdde7 Add constructor parameter: add generic types correctly
#KT-34203 Fixed
2019-12-17 11:00:51 +03:00
tommykw 76a65af14b Fix #KT-31967 Typo in inspection name: "+= create new list under the hood" 2019-12-17 10:56:56 +03:00
Mikhail Glukhikh ae827bfd80 Use declaration-site session in phased FIR instead of use-site session
This allows us to successfully find containing file for another module declaration
2019-12-17 10:43:23 +03:00
Mikhail Glukhikh 37839a181c Introduce FirIdeModuleDependenciesSymbolProvider #KT-35424 In Progress
This solves problems with inter-module dependencies, at least in small projects.
However, Kotlin project still does not see stdlib.
Also, we often have problems with untouched types during expected type checks
(FirUserTypeRef instead of FirResolvedTypeRef)
2019-12-17 10:41:24 +03:00
Mikhail Glukhikh befcfad898 Rename: IdeFirProvider -> FirIdeProvider 2019-12-17 10:41:23 +03:00
Mikhail Glukhikh 8703da5a25 Rename: FirResolveState -> FirModuleResolveState to reflect per-module status 2019-12-17 10:41:23 +03:00
Dmitry Gridin 8dbbd64beb idea: cleanup code 2019-12-17 13:56:48 +07:00
Natalia Selezneva e77d8657f4 Fix configuration for AS 3.5 2019-12-16 23:17:33 +03:00
pyos 54d707b3b6 JVM_IR: make constructors of named local classes public
They are accessible through reflection
2019-12-16 20:54:48 +01:00
Mads Ager 82f48cdd11 JVM_IR: Backwards compatible handling of default tailrec params.
Before 1.4 tailrec function default arguments were evaluated
right-to-left instead of left-to-right. This is controlled
by a compile-time flag. This change adds support for the
right-to-left evaluation order when that flag is not set.
2019-12-16 20:52:52 +01:00
Simon Ogorodnik 90a1b15b77 [FIR] Make statics visible from nested companion/classes 2019-12-16 21:21:12 +03:00
Simon Ogorodnik 02cbe990c0 [FIR] Use fast firSymbolProvider access 2019-12-16 21:21:11 +03:00
Simon Ogorodnik 2e27862d38 [FIR] Cache lookupTag lookup on creation from symbol (partially) 2019-12-16 21:21:10 +03:00
Simon Ogorodnik 0fb883ef62 [FIR] Use builtinTypes instead of creating new ones 2019-12-16 21:21:09 +03:00