Commit Graph

87184 Commits

Author SHA1 Message Date
Ilya Goncharov 025e335b0f [JS IR] Add more granularity to find enum related declarations
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:20 +00:00
Ilya Goncharov c7bec4c6c4 [JS IR] Allow to export enum classes
^KT-37916 fixed
^KT-44494 fixed
2021-11-01 13:28:19 +00:00
Ilya Goncharov 196dc6b071 [JS IR] Add test for enum exportness
^KT-44494 fixed
2021-11-01 13:28:19 +00:00
Mads Ager 41aa0a7c7f [FIR] Fix line number differences between psi2ir and fir2ir. 2021-11-01 15:43:13 +03:00
Mads Ager 8a8c38cc48 [FIR] Enable stepping tests. 2021-11-01 15:43:08 +03:00
Mikhael Bogdanov 2258e26799 Fix INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER diagnostic in IDE 2021-11-01 13:30:58 +01:00
Mikhael Bogdanov 40158d1ce6 Update -Xjvm-default description 2021-11-01 13:30:58 +01:00
Mikhael Bogdanov 00d344d92a Update INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER message 2021-11-01 13:30:57 +01:00
Mikhael Bogdanov afc149d460 JvmDefault. Allow non default inheritance with special flag
#KT-47000
2021-11-01 13:30:57 +01:00
Stanislav Erokhin c9e7c5d156 [LC] Mute Light tests about repeatable annotation
It isn't supported in Light classes, so we should mute it.
Quite similar change was done in 724194dec0
2021-11-01 10:38:09 +00:00
Stanislav Erokhin c591601274 [LC] IDE LightClasses testdata update
Unfortunately, the same testdata is used in IDE, so we should change
testdata in compiler repo and this will affect IDE repo.
This commit is the cherry-pick of commits from IDE repo:
- 4310d730795a53a Fix UltraLightClassLoadingTestGenerated.testEnums():
       check by Java file as ULC produces a different but better result
       Yan Zhulanow 3/17/21, 8:57 AM
- fbe3c8ba0841f2d4 Disable comparison test for
       UltraLightClassSanityTestGenerated.
       testAnnotatedPropertyWithSites() Yan Zhulanow 3/18/21, 1:33 PM
- 8fc53027343b5b53 Ignore known (for ages) broken behaviour
       of LC Vladimir Dolzhenko 3/19/21, 11:17 PM
2021-11-01 10:38:09 +00:00
Stanislav Erokhin f455141ade [ULC] Fix rendering for Foo.class in annotation value
Previously it was Foo::class, but it isn't correct because in java it
is Foo.class

P.s. Array<Foo> cannot be passed as annotation parameter
2021-11-01 10:38:09 +00:00
Stanislav Erokhin 65abc94411 [ULC] Unify modifiers for RepeatableAnnotationContainer
All the other annotation classes has abstract modifier.
All nested interfaces has static modifiers.

This commit is not so important for compiler, but it is matter for IDE,
because when we load classes in IDE via
KtLightClassForDecompiledDeclaration -- there are Abstract and Static
on the Container class
2021-11-01 10:38:08 +00:00
Victor Petukhov b7a9a7d922 Make backTicked.kt test more reasonable, though real invoking the passed lambda 2021-11-01 13:03:41 +03:00
Victor Petukhov 4118f3146b Use proper isPlaceholder check for psi type references 2021-11-01 13:03:41 +03:00
Victor Petukhov c8dea3db35 Add test for using underscored type in different positions 2021-11-01 13:03:40 +03:00
Victor Petukhov d1acb09add Report unsupported on using underscored type argument if the corresponding feature is disabled 2021-11-01 13:03:40 +03:00
Victor Petukhov 8a99aa4b42 [FIR] Don't build placeholder projection for types 2021-11-01 13:03:40 +03:00
Victor Petukhov b29aeaa596 [FIR] Implement annotation checker for underscored type arguments 2021-11-01 13:03:37 +03:00
Victor Petukhov 697ef03d57 [FIR] Make FirPlaceholderProjection having source element 2021-11-01 13:03:31 +03:00
Victor Petukhov 5047751b85 [FIR] Support underscored type arguments in the light tree 2021-11-01 12:26:31 +03:00
Victor Petukhov c9fbbe74ae [FIR] Use common isPlaceholder check for type arguments in RawFirBuilder 2021-11-01 12:25:55 +03:00
Victor Petukhov 5508d40371 Put using underscored type arguments under a feature 2021-11-01 12:25:45 +03:00
Victor Petukhov 1073adbbf0 Report unsupported errors on annotations on underscored type arguments 2021-11-01 12:25:14 +03:00
Victor Petukhov 248c9550cd Support type annotations resolution on an underscored type argument 2021-11-01 12:25:10 +03:00
Victor Petukhov b69fb6779f Basic support of partially specified type arguments though a new underscore operator for type arguments
^KT-13394
2021-11-01 12:25:07 +03:00
Margarita Bobova e057831f7f Add changelog for 1.5.31 2021-11-01 10:25:18 +03:00
Dmitriy Novozhilov 275a8a7a36 [FE 1.0] Fix message for UNINITIALIZED_ENUM_COMPANION_WARNING\
^KT-49110
2021-10-30 13:43:12 +03:00
Dmitriy Novozhilov 2956b8b307 [FE 1.0] Fix commit message of UNNECESSARY_SAFE_CALL warning
^KT-46860
2021-10-30 13:41:24 +03:00
Dmitriy Novozhilov b9189f3099 Advance bootstrap to 1.6.20-dev-4603 2021-10-30 13:35:20 +03:00
Artem Kobzar 979e9f94ef feat(Escaped Identifiers): add ability to use any symbol wrapped in back ticks. 2021-10-29 17:55:59 +00:00
zhelenskiy ea10b4a781 Synchronizing by values and primitives is forbidden
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-10-29 18:50:30 +02:00
Dmitriy Novozhilov 877b53201b [FIR] Prohibit access to members of companion of enum from enum entry initializer
^KT-49110
2021-10-29 18:45:23 +03:00
Dmitriy Novozhilov 58889a2b5c [FE 1.0] Prohibit access to members of companion of enum from enum entry initializer
^KT-49461 Fixed
^KT-49110
2021-10-29 18:45:19 +03:00
Dmitry Petrov 4f0c3c3c0d JVM_IR never generate setter synthetic accessor for 'val' field
KT-49316
2021-10-29 18:38:11 +03:00
Yahor Berdnikau d7ae7ca911 Ensure all test tasks is finalized by 'cleanTestKitCacheTask' on CI.
^KT-45745 In Progress
2021-10-29 17:34:00 +02:00
Yahor Berdnikau c25d243111 Add 'kgpOtherTests' task.
This will run tests for all support plugins, such kapt, allopen, etc...

^KT-45745 In Progress
2021-10-29 17:34:00 +02:00
Artem Kobzar 102072a229 fix(KT-40236): compute JsName from overridden symbols. 2021-10-29 14:09:31 +00:00
Roman Golyshev 29bb8cea8f [FIR] Add missing ensureResolved to FirClassSubstitutionScope
`createNewTypeParametersAndSubstitutor` call might need resolved types
to be able to work correctly with the generics' type bounds
2021-10-29 15:59:35 +03:00
Georgy Bronnikov 534beb8553 IR: Test for toSkip(this) in T.resolveFakeOverride()
^KT-49371 Fixed
2021-10-29 12:13:57 +03:00
David Saff c67a1ee2e5 Add a dry-run arg to show what _would_ be run, without actually running (#4630) 2021-10-29 11:38:56 +07:00
Sergey Bogolepov d072a3ca59 [K/N] Fix fileCheckTest temporary files dir 2021-10-29 04:07:31 +00:00
Sergey Bogolepov 95bd5fcc4b [K/N] Update filecheck tests for different ABIs 2021-10-29 04:07:31 +00:00
Sergey Bogolepov 49fdeb73ee [K/N] Make default LLVM attributes target-specific
Unfortunately, the world of native development is diverse,
and we can't generate one bitcode that is correct on every platform.
What is important to us is that AAPCS64 and Windows x64 extend
<32 bit arguments on callee side, so we can't use zext/sext args for them.
2021-10-29 04:07:30 +00:00
Sergey Bogolepov fdd020eab6 [K/N] Tests for function attributes in bitcode generator
Besides, well, tests themselves, this commit extends FileCheck infra to
make it possible to test bitcode for direct and reverse interop.
2021-10-29 04:07:30 +00:00
Sergey Bogolepov 851f4d86d9 [K/N] Include cstubs into -Xsave-llvm-ir
This way we are able to FileCheck interop bridges.
2021-10-29 04:07:29 +00:00
Sergey Bogolepov 71fb8f90d4 [K/N] Drop UnsignedValuePassing
We don't need it anymore since codegen now handles unsigned types.
2021-10-29 04:07:29 +00:00
Sergey Bogolepov e37d669dc3 [K/N] Opt-in for meaningful names for in "objc2kotlin" bridges
It is hard to run FileCheck tests over generated ObjC bridges because
they share the same name ("objc2kotlin"). To overcome this hurdle,
this commit introduces a compiler flag that appends function name to
"objc2_kotlin". This change might be useful for end-users, for example,
it makes stacktraces more readable. But it will require additional
testing and polishing which is out of the scope of this change.
2021-10-29 04:07:28 +00:00
Sergey Bogolepov cf3296c94c [K/N] LLVM attributes at call-sites
(I messed up commit history and all changes had to be squashed. Sorry.)

The commit is originated from KT-48591. The root of the problem is
following: we unconditionally added sext to all value parameters of
imported functions. To fix this problem we have to pass zext/sext
depending on the parameter type.

To make things right and future-proof, we decided to refactor
a significant part of IR to bitcode translator: when generating callsite
compiler "looks" at callee and applies its attributes to the callsite.
There are several sources of attributes:
1. External LLVM functions from runtime: just copy-paste attributes.
2. Direct IR calls: infer attributes from the declaration.
3. Virtual calls: use available declaration, so almost the same as prev.
4. External declarations functions: manual labor!

Specifying attributes at all callsites (including Kotlin->Kotlin) makes
things uniform and a little easier to implement.
All in all, the delta is significant, but comprehensible. In some places
I managed to make it seamless by changing declaration type and its
usages types simultaneously. In others (ObjCExport), unfortunately,
things got a little messy.

#KT-48722 fixed
2021-10-29 04:07:28 +00:00
Svyatoslav Kuzmich a13329fc65 [JS IR] Regenerate and mute test 2021-10-28 22:39:09 +03:00