Commit Graph

50205 Commits

Author SHA1 Message Date
Pavel V. Talanov 47935c19e6 Show line markers for JUnit test methods in abstract class
#KT-27977 Fixed
2018-11-09 15:51:34 +01:00
Ilya Chernikov 9c51f521a9 Add embeddable version of the jvm scripting host
#KT-27382 fixed
2018-11-09 15:57:09 +03:00
Toshiaki Kameyama d64ca8a8f9 Insert paird brackets: enable on before colon #KT-9840 Fixed 2018-11-09 15:15:59 +03:00
Ilya Gorbunov 5f4e8bf4fb Correct abstract mutable collections declarations in kotlin-stdlib-common
Add SinceKotlin(1.3) to the new and substantially changed common declarations

#KT-28091
2018-11-09 13:39:44 +03:00
Ilya Gorbunov 4f2ec3533a Remove inline modifier from expect functions without lambda or reified types
This gives more flexibility when providing actuals for them.
2018-11-09 13:39:07 +03:00
Mikhael Bogdanov 3e26f17e9d Update proguard config for AS 34 2018-11-09 10:30:00 +01:00
Denis Zharkov fadd2c12c2 Update idea to 2018.2.6 RC (182.5107.16) 2018-11-09 11:59:25 +03:00
Toshiaki Kameyama 2683b25728 "Change type" quick fix: fix false negative in 'when' branch #KT-8820 Fixed 2018-11-09 11:09:02 +03:00
Dmitry Petrov 6d0a403ead KT-26765: Support 'call' for constructors with inline class parameters 2018-11-09 10:21:46 +03:00
Ilya Gorbunov 23ead5e430 Remove extensive testing of the discontinued jre7/8 artifacts 2018-11-09 04:00:26 +03:00
Ilya Gorbunov b026b9eb22 Remove +ReleaseCoroutines explicit feature enabling
It's enabled by default in Kotlin 1.3
2018-11-09 04:00:26 +03:00
Ilya Gorbunov a64a76d5fc Remove experimental coroutines opt-in from build scripts
It has no effect in Kotlin 1.3

Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Ilya Gorbunov ea0030f324 Actualize Deprecated annotation and DeprecationLevel enum docs
...to clear some confusion from KT-25643.
Describe level property usage scenario in detail.
2018-11-08 19:39:41 +03:00
Roman Artemev 8f2117685f [JS BE] Support contracts in JS Fix KT-27946 2018-11-08 17:35:06 +03:00
Roman Artemev b010d9eef8 Add Contract tests for JS 2018-11-08 17:35:06 +03:00
Mikhail Glukhikh caad0d5a74 ExposedVisibilityChecker refactoring: make trace BindingTrace 2018-11-08 17:16:06 +03:00
Mikhail Glukhikh d464b441c8 ExposedVisibilityChecker refactoring: extract 'reportExposure' 2018-11-08 17:16:06 +03:00
Mikhail Glukhikh b3857e85e0 Report exposed type for properties in class primary constructor
Before this commit, we compared property visibility with constructor
visibility only, which is incorrect. Now we compare property visibility
also with class visibility

#KT-19613 Fixed
2018-11-08 17:16:06 +03:00
Mikhael Bogdanov f160eabaf6 Switch snapshot to exact IDEA 183 dependency 2018-11-08 13:47:17 +01:00
Mikhael Bogdanov e8db36e2f1 Update dependencies for AS34 2018-11-08 13:47:16 +01:00
Simon Ogorodnik cf9b2e6377 Fix potential CCE in LightCodeInsight tests in non-JVM 2018-11-08 15:31:30 +03:00
Simon Ogorodnik f40cc2eb3f Fix CCE in JSBasicCompletionTest 2018-11-08 15:31:29 +03:00
Denis Zharkov d74c12323f Fix ambiguity when KtUltraLightClass contains overrides
#KT-27987 Fixed
2018-11-08 15:25:41 +03:00
Denis Zharkov 234776820b Use KotlinLightReferenceListBuilder for type parameters bounds
It doesn't run resolve() on freshly added reference, thus the latter is
not failing in recursive case like T : Enum<T>
2018-11-08 15:25:41 +03:00
Denis Zharkov a4cc67d0a0 Refine isInlineOnly check in KtUltraLightClass 2018-11-08 15:25:41 +03:00
Denis Zharkov 34f9a1e70e Do not build no-arg constructor overload for inner KtUltraLightClass 2018-11-08 15:25:41 +03:00
Denis Zharkov 8999a21764 Refine visibility computation for lateinit's field in KtUltraLightClass 2018-11-08 15:25:41 +03:00
Denis Zharkov 99afc40d93 Use ModuleDescriptor::stableName for mangling in KtUltraLightClass 2018-11-08 15:25:41 +03:00
Denis Zharkov 6fc8c98aea Avoid calling PsiType::resolve while adding supertype references
Otherwise, e.g. in case of inner classes it may lead to
StackOverflowError:
- Someone tries to resolve supertypes
- We're starting building extends/implements lists
- Then calling resolve on the type references leads that some logic
in Java resolution again is trying to resolve supertype of the same
class (only in case of inner ones)

Probably, it could be fixed on the side of Java resolve
but at the same time it's clear that calling `resolve` while building
extends list it's really somewhat not very cool

The exception is following:
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration$_extendsList$2.invoke(KtLightClassForSourceDeclaration.kt:77)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration$_extendsList$2.invoke(KtLightClassForSourceDeclaration.kt:73)
	at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.get_extendsList(KtLightClassForSourceDeclaration.kt)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.getExtendsList(KtLightClassForSourceDeclaration.kt:320)
	at com.intellij.psi.impl.PsiClassImplUtil.getExtendsListTypes(PsiClassImplUtil.java:1017)
	at com.intellij.psi.impl.light.AbstractLightClass.getExtendsListTypes(AbstractLightClass.java:137)
	at com.intellij.psi.impl.ScopedClassHierarchy.getSuperTypes(ScopedClassHierarchy.java:95)
	at com.intellij.psi.impl.ScopedClassHierarchy.visitType(ScopedClassHierarchy.java:80)
	at com.intellij.psi.impl.ScopedClassHierarchy.getSuperClassSubstitutor(ScopedClassHierarchy.java:115)
	at com.intellij.psi.impl.JavaClassSupersImpl.getSuperSubstitutorWithCaching(JavaClassSupersImpl.java:111)
	at com.intellij.psi.impl.JavaClassSupersImpl.getSuperClassSubstitutor(JavaClassSupersImpl.java:71)
	at com.intellij.psi.util.TypeConversionUtil.getMaybeSuperClassSubstitutor(TypeConversionUtil.java:1089)
	at com.intellij.psi.util.TypeConversionUtil.getClassSubstitutor(TypeConversionUtil.java:1055)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.advancedResolveImpl(ClsJavaCodeReferenceElementImpl.java:143)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.access$000(ClsJavaCodeReferenceElementImpl.java:43)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl$Resolver.resolve(ClsJavaCodeReferenceElementImpl.java:121)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl$Resolver.resolve(ClsJavaCodeReferenceElementImpl.java:115)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:203)
	at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:99)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:202)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.multiResolve(ClsJavaCodeReferenceElementImpl.java:223)
	at com.intellij.psi.impl.compiled.ClsJavaCodeReferenceElementImpl.advancedResolve(ClsJavaCodeReferenceElementImpl.java:213)
	at com.intellij.psi.impl.source.PsiClassReferenceType.resolveGenerics(PsiClassReferenceType.java:191)
	at com.intellij.psi.impl.source.PsiClassReferenceType.resolve(PsiClassReferenceType.java:138)
	at org.jetbrains.kotlin.asJava.classes.LightReferenceListBuilder.addReference(LightReferenceListBuilder.java:53)
	at org.jetbrains.kotlin.asJava.classes.KtUltraLightClass.createExtendsList(ultraLightPsi.kt:91)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration$_extendsList$2.invoke(KtLightClassForSourceDeclaration.kt:77)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration$_extendsList$2.invoke(KtLightClassForSourceDeclaration.kt:73)
	at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:107)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.get_extendsList(KtLightClassForSourceDeclaration.kt)
	at org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration.getExtendsList(KtLightClassForSourceDeclaration.kt:320)
	at com.intellij.psi.impl.PsiClassImplUtil.getExtendsListTypes(PsiClassImplUtil.java:1017)
	at com.intellij.psi.impl.light.AbstractLightClass.getExtendsListTypes(AbstractLightClass.java:137)
	a
2018-11-08 15:25:41 +03:00
Denis Zharkov 34e8ce6a48 Fix data race in LightReferenceListBuilder
Effectively this is a cherry-pick of
https://github.com/JetBrains/intellij-community/commit/75032008695977f171540b5f0e055b77aa682c0c
2018-11-08 15:25:41 +03:00
Denis Zharkov 94d9fd8b72 Add our own version of LightReferenceListBuilder
There are some issues with one from the platform that may be backported
at some moment, but now it's faster to have our own implementation
2018-11-08 15:25:41 +03:00
Denis Zharkov 875e9d2a36 Fix KtUltraLightMethod::getParameterList
There's already a correct override in KtLightMethodImpl
Otherwise the tests is failing because clsDelegate.parameterList
has a wrong parent
2018-11-08 15:25:41 +03:00
Denis Zharkov 3814c7687b Add JavaAgainstKotlinSourceCheckerWithUltraLightTestGenerated 2018-11-08 15:25:41 +03:00
Denis Zharkov 5f45ab1e2b Support forcing usage of ultra-light classes in tests 2018-11-08 15:25:41 +03:00
Denis Zharkov 03e937ddfa Minor. Reformat KtLightClassForSourceDeclaration.kt 2018-11-08 15:25:41 +03:00
Svyatoslav Kuzmich 0bf3199c19 Support nullable inline classes 2018-11-08 15:00:33 +03:00
Svyatoslav Kuzmich 5ea7673950 [JS IR BE] Mute inline class tests 2018-11-08 15:00:32 +03:00
Svyatoslav Kuzmich 43b4b6eaae Add more specific fail messages in inline class box tests 2018-11-08 15:00:31 +03:00
Svyatoslav Kuzmich 370b04df35 [JS IR BE] Inline classes lowering 2018-11-08 15:00:30 +03:00
Svyatoslav Kuzmich 4866c2b36a [IR] Move irCall from JS backend to common utils 2018-11-08 15:00:09 +03:00
Svyatoslav Kuzmich 81d61aefff [IR] Specify IrType in irTemporary 2018-11-08 15:00:09 +03:00
Svyatoslav Kuzmich dd20775662 [IR] Move IrFunction.isStatic from JS to Common 2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich 4f6a18e29a [IR] Update parents when transforming declaration containers 2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich 38b31e8f7d [JS IR BE] Fix reusing expression instances 2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich 47b0f94903 [JS IR BE] Fix funny safe call 2018-11-08 15:00:08 +03:00
Svyatoslav Kuzmich 27ff4da94d [JS IR BE] Bugfix: set overriden symbols for generated bridges 2018-11-08 15:00:08 +03:00
Pavel V. Talanov 54dc1a779e Fix test: experimental API usage error reporting in js module
Make module a js module so that test passes
2018-11-08 11:22:46 +01:00
Toshiaki Kameyama 6971ca44e7 Generate equals and hashCode: enable for data classes #KT-17502 Fixed 2018-11-08 12:51:29 +03:00
Dmitry Petrov b5664755c8 Minor: remove IGNORE_BACKEND for passing JS_IR tests 2018-11-08 12:29:15 +03:00
Dmitry Petrov 8262d4a4b9 psi2ir: Don't generate constructor bodies for 'external' classes
#KT-27934
2018-11-08 12:29:15 +03:00