Commit Graph

203 Commits

Author SHA1 Message Date
Mikhail Bogdanov 9c0b96af71 Report error on missed specialization in compatibility mode
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov 477cca3c99 Add JvmDefaultWithoutCompatibility annotation 2020-06-19 11:57:35 +02:00
Dmitry Petrov de25359a90 Fix stdlib compilation after updated @JvmName check
Previously, extension receiver type was not taken into account when
checking for @JvmName annotation applicability to possibly mangled
functions (such functions, however, were mangled).
This bug was fixed, but, unfortunately, not before such functions were
added to stdlib ('sumOf' family).
2020-06-04 12:16:28 +03:00
Victor Petukhov 379c6944a2 NI: extract diagnostics from partially resolved call instead of separately handling it including running all checks
^KT-37630 Fixed
^KT-35494 Fixed
2020-05-22 22:13:53 +03:00
Dmitry Petrov de4ebe4395 Prohibit @JvnName on functions mangled because of return type 2020-05-20 07:19:29 +03:00
Jinseong Jeon 7b01cf7b04 FIR: handle labeled super reference properly 2020-05-07 12:02:56 +03:00
Mikhail Bogdanov 4f7599076c Postpone JvmDefault deprecation. Revert "Deprecate @JvmDefault"
This reverts commit c11f3868
2020-05-04 10:02:16 +02:00
Denis Zharkov c6ae423816 Add tests for KT-35468
^KT-35468 Fixed
2020-04-29 09:17:54 +03:00
Nick 96238cbe1f [FIR] Support diagnostic QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE 2020-04-24 16:48:28 +03:00
Mikhail Bogdanov c11f38688e Deprecate @JvmDefault 2020-04-09 07:37:31 +02:00
Mikhail Glukhikh 7bfd354a77 Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed 2020-03-27 16:46:59 +03:00
Ilya Chernikov 70c89a28e1 Stop subtyping constraint search if equality constraints for...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00
Mikhail Glukhikh 8884cbe415 Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed 2020-03-05 09:39:40 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Mikhail Zarechenskiy 319a38bd5c [NI-MIGRATE] Update diagnostic messages 2020-02-13 11:15:59 +03:00
Mikhail Glukhikh 71b0840ef9 [FIR] Implement super resolve as a particular tower resolver case 2020-02-05 11:19:19 +03:00
Mikhail Glukhikh 99643e1b2d FIR: do not run full tower resolve on integer literal type 2019-12-19 16:03:17 +03:00
Dmitriy Novozhilov 2536fa0cd5 [FIR-TEST] Add new testdata generated after changes in previous commit 2019-12-12 16:11:46 +03:00
Pavel Kirpichenkov 87b88a738e [Minor] Update test data for NI 2019-10-25 19:37:06 +03:00
Mads Ager 6c7a904663 Psi2Ir: Mark accessors with no bodies as default accessors.
They are currently marked as defined even when they get a
default implementation. That makes it hard to figure out
if the accessor should be removed when introducing a backing
field in the JVM_IR backend.
2019-08-28 19:25:13 +02:00
Alexander Udalov 312205f376 Prohibit synchronized methods on interface members
#KT-9310 Fixed
2019-08-22 18:04:00 +02:00
Dmitriy Novozhilov 0f7e91ff6d [NI] Update testdata for stdlib diagnostic tests 2019-05-29 10:53:34 +03:00
Dmitriy Novozhilov e70bdb51c5 [NI] Automatically squash equal diagnostics in OI and NI in testdata 2019-04-19 10:53:19 +03:00
Dmitriy Novozhilov d01b6ef900 Revert "[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed"
This reverts commit 90628112
With that annotation there is complex bug that breaks build of Kotlin compiler
2019-03-18 18:53:38 +03:00
Dmitriy Novozhilov 9062811231 [NI] Support @OnlyInputTypes annotation. #KT-29307 fixed
Also KT-26698 fixed in new inference
2019-03-15 10:39:11 +03:00
Alexander Udalov 59fda8d7ce Support JvmPackageName with JvmMultifileClass
This is an internal feature of our standard library needed to compile
new API for unsigned types
2019-03-06 15:34:23 +01:00
Alexander Udalov 4692247897 Do not check backing field presence in AnnotationSplitter
This code can be invoked early, during body resolution and before the
fact that a property has backing field (which is only known for certain
after body resolution, because an implicit 'field' identifier may be
used). Since split annotations are cached until the end of the program,
they may end up on incorrect elements in the bytecode (or disappear
completely) as in KT-29507 or KT-28182.

Because the FIELD target has the lowest priority among implicit
annotation targets (see TARGET_PRIORITIES), it's safe to always assume
that FIELD is a valid target when splitting annotations. This only
changes the way annotations are split in case of incorrect code, as
changes in test data show.

 #KT-28182 Fixed
 #KT-29507 Fixed
2019-02-15 17:53:27 +01:00
victor.petukhov 30762a450a Wrap diagnostic parameters to double quotes and split by comma instead of semicolon 2019-02-14 12:31:42 +03:00
victor.petukhov 46bd5ba107 Add alphabetical sorting diagnostics with same ranges 2019-02-14 12:31:42 +03:00
Dmitriy Novozhilov 0501a108c0 Fix tests in DiagnosticsTestWithStdLibGenerated with NI 2019-02-01 11:40:20 +03:00
Mikhail Zarechenskiy e4a4d1169e Prohibit JvmOverloads on constructors of annotation classes
In LV >= 1.4 & -progressive

 #KT-25702 Fixed
2018-12-24 12:48:00 +03:00
Alexander Udalov 37e1b486f4 Minor, remove obsolete API_VERSION directives 2018-12-20 12:53:23 +01:00
Alexander Udalov e3c381a298 Remove API_VERSION 1.3 from tests on JvmDefault
So that these tests will now check behavior on the latest API version
2018-12-20 12:53:23 +01:00
Mikhail Glukhikh f3555daa60 Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed 2018-10-25 19:10:39 +03:00
Alexander Udalov d1e1e274d9 Render property accessor annotations in .txt test data
If property accessor rendering is disabled in a test, render annotations
on accessors as use-site-targeted, as was done with
`@setparam:`-annotations. Otherwise they were lost
2018-10-24 18:17:12 +02:00
Alexander Udalov f63cf9d506 Use JvmName on kotlin.Metadata parameters to improve public API
#KT-26359 Fixed
2018-09-12 14:37:11 +03:00
Mikhail Zarechenskiy 7b70c1a2d9 Allow kotlin.Result only for declarations that are effectively fields 2018-09-11 10:39:25 +03:00
Mikhail Zarechenskiy e5ee142208 Prohibit @JvmField on properties of inline class types
#KT-26454 Fixed
2018-09-11 10:39:17 +03:00
Mikhail Zarechenskiy 55ef96e5c9 Prohibit @JvmName on functions that are assumed to be mangled
#KT-26454 In Progress
2018-09-11 10:39:16 +03:00
Alexander Udalov 0fa2d29779 Fix test data in annotationsOnUseSiteTargets.kt
After the initial commit fc87043cb3 has been authored, master has
advanced to 1.3 where this diagnostic had slightly changed
2018-09-07 00:14:33 +03:00
Alexander Udalov fc87043cb3 Merge use-site targeted annotations into corresponding Annotations
Add PropertyDescriptor.backingField/delegateField to store annotations
on the field directly in an otherwise almost empty descriptor instance,
instead of storing them with use-sites in the corresponding property
descriptor. Instead of AnnotationWithTarget, create AnnotationDescriptor
instances in AnnotationSplitter. Change DescriptorRenderer to render
annotations on "related" declarations when needed, with the explicit
use-site target if applicable.

Most changes in diagnostic test data are related to the fact that
annotations which are known to have an incompatible use-site to the
declaration they're applied at (such as `@param:`-annotation on a
function), are now not loaded at all. It's fine because the code is
erroneous, so it doesn't really matter how do we load annotations with
invalid targets (some of this logic is also changed freely in subsequent
commits). Some changes are also explained by the fact that for example
an annotation on the property which is only applicable to FIELD is now
rendered with an explicit use-site target `@field:`, regardless of
whether it did have that use-site target syntactically or not.

Basically, after this change there's no point in calling
Annotations.getUseSiteTargetedAnnotations/getAllAnnotations anymore
because it's easier and more intuitive to just use Annotations of the
corresponding descriptor -- the backing / delegate field (introduced in
this commit) or the extension receiver / setter parameter (related
behavior was fixed in previous commits). Usages of
use-site-target-related methods will be refactored out in subsequent
commits
2018-09-06 19:13:11 +03:00
Alexander Udalov f423403167 Make kotlin.Metadata public
Prohibit explicit usage of `@Metadata` to prevent possible
AnnotationFormatError at runtime

 #KT-23602 Fixed
2018-08-30 14:50:25 +03:00
Mikhail Zarechenskiy 34cd0e9f6c Do not report warning about useless annotations for JvmStatic properties
#KT-25745 Fixed
2018-08-08 15:47:25 +03:00
Dmitry Petrov acf0bb349c Update testData for restricted expression annotations retention 2018-07-20 10:39:51 +03:00
Dmitry Petrov 5767f84c0e Restrict retention for annotations with target EXPRESSION
#KT-13762 Fixed
2018-07-18 14:21:03 +03:00
Mikhael Bogdanov 52b261e19e Fix test data 2018-07-17 13:30:43 +02:00
Mikhail Zarechenskiy b6db8971e4 Warn about annotations that targets non-existing accessors
#KT-15453 In Progress
2018-07-17 00:22:53 +03:00
Mikhael Bogdanov 1d283d243e Support @JvmField on interface properties
#KT-15807 Fixed
2018-07-16 16:13:15 +02:00
Mikhael Bogdanov eb745133c9 Switch @JvmStatic diagnostic test to LanguageFeature usage 2018-07-10 16:04:30 +02:00
Alexander Udalov 984e37c7f1 Prohibit explicit usage of kotlin.Metadata as annotation 2018-06-27 12:37:18 +02:00