Commit Graph

151 Commits

Author SHA1 Message Date
Mikhael Bogdanov 56d1184515 Restrict conditions for @JvmDefault super calls
Condition was too strict
  if @JvmDefault implicitly hidden by class in inheritance.
  Diagnostic is redundant cause there isn't breaking
  change depending on interface method generation strategy and
  delegating stub generation in inheriting class.
2018-04-10 16:33:26 +02:00
Mikhael Bogdanov 6d1af263ba Restrict conditions for @JvmDefault super calls
Condition was too strict if we actually make super call
  through super class. Diagnostic is redundant cause there isn't breaking
  change depending on interface method generation strategy.
2018-04-10 16:33:25 +02:00
Mikhael Bogdanov c5d4f22e4f Add quick fix for adding @JvmDefault annotation 2018-04-09 18:13:36 +02:00
Mikhael Bogdanov 31e459d9c0 Fix misspelling in test data 2018-04-09 18:13:35 +02:00
Mikhael Bogdanov d788b3b6f9 Add warning on overriding java default by non @JvmDefault method 2018-04-09 18:13:35 +02:00
Mikhael Bogdanov cb9c1ae104 Support default method super calls within @JvmDefault ones 2018-04-09 18:13:34 +02:00
Mikhael Bogdanov 08ff1de248 Update test data 2018-04-03 19:38:37 +02:00
Mikhael Bogdanov 2c56f0bfd3 Require 'jvmDefaultFlag' for default super calls 2018-04-03 19:18:19 +02:00
Mikhael Bogdanov 23e8adb793 Add custom diagnostic checker for @JvmDefault annotation 2018-04-03 19:18:17 +02:00
Mikhael Bogdanov 38f8924ae3 Update test data. Use simple ''@JvmDefault' instead full qualifier 2018-04-03 19:18:15 +02:00
Mikhael Bogdanov 1d3e57acee Add @JvmDefault diagnostics 2018-04-03 19:18:10 +02:00
Mikhael Bogdanov 5830f99bce Remove unused test data 2018-04-03 19:18:08 +02:00
Mikhail Zarechenskiy 4ebd11a7ae Refactoring: rename parameter to argument for annotation diagnostics 2018-03-22 03:59:55 +03:00
Mikhael Bogdanov c4da370b0b Allow to use @JvmStatic in interface companion object 2018-01-26 10:09:20 +01:00
Alexander Udalov a46a2b9b1c Support nested classes in annotation classes
#KT-16962 In Progress
2018-01-24 15:54:35 +01:00
Alexander Udalov 7f8634d9ef Revert "Temporarily remove JvmPackageName and tests, but keep the implementation"
This reverts commit 9ae6feb2c5.
2017-10-11 19:20:24 +03:00
Dmitry Savvinov 87b85ce978 Fix testdata for tests which use varargs
Change tests to use new syntax for array literals to prevent deprecation
warnings (see KT-20171).
2017-10-11 18:06:00 +03:00
Dmitry Petrov 26136cd0fe Check constness of 'apiVersionIsAtLeast' arguments 2017-10-10 09:04:51 +03:00
Alexander Udalov 9ae6feb2c5 Temporarily remove JvmPackageName and tests, but keep the implementation
This is needed because we want the compiler code to stay as much the
same in master and in 1.2 as possible
2017-09-13 23:23:36 +03:00
Alexander Udalov e8e38d90ff Validate JvmPackageName annotation value and placement
- do not allow it to be used together with JvmMultifileClass (otherwise
  implementation becomes complex)
- do not allow to declare classes in a JvmPackageName-annotated file
  (similarly, the implementation of this would be much harder in the
  compiler, and there would need to be special support in the IDE)
- check that the value is a valid FQ name
- do not allow root package just in case
2017-09-13 22:59:03 +03:00
Mikhail Glukhikh 7a53b2f4c8 Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
It is not reported for 1.0 language version because
renaming to _ is not possible. It has weak warning severity

So #KT-8813 Fixed
So #KT-16875 Fixed
2017-04-04 14:23:30 +03:00
Mikhail Zarechenskiy 8466270bdb Check that arguments of array function call in annotation are constants
#KT-16956 Fixed
2017-03-22 17:59:58 +03:00
Mikhail Zarechenskiy d7093db5c5 Allow to use emptyArray in annotation as argument
#KT-14236 Fixed
2017-02-07 14:07:20 +03:00
Dmitry Petrov 5ef27f7ad3 KT-15010 Missing error on an usage non-constant property in annotation default argument 2017-01-24 17:52:52 +03:00
Mikhail Glukhikh 60fcdeb5ee Test added: suppress on function reference #KT-15839 Obsolete 2017-01-24 14:59:53 +03:00
Dmitry Jemerov b8525de726 Disallow @JvmOverloads on any interface methods
#KT-12224 Fixed
2016-11-18 11:05:02 +01:00
Dmitry Jemerov 79e90b32e8 @JvmOverloads on local declarations is now an error 2016-11-18 11:05:01 +01:00
Dmitry Jemerov 12e4cf9a4f Report @JvmOverloads errors on annotation, not on entire declaration (KT-12701) 2016-11-18 11:05:00 +01:00
Denis Zharkov 4c69416f2b Report warning on unused entities that can be renamed to _
Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Valentin Kipyatkov ec51076355 DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers 2016-10-11 23:38:54 +03:00
Nikolay Krasko eee45e91ce Add more tests for PropertyAccessorDescriptor.isDeafult() usages 2016-06-29 16:16:31 +03:00
Mikhail Glukhikh f76efb68f2 Strictfp on a class is now a warning #KT-11109 Fixed 2016-03-12 13:17:11 +03:00
Alexander Udalov 8e77e16bbd Remove leftovers of platformName and platformStatic in test data
Drop unnecessary imports, rename some tests
2016-03-02 16:47:04 +03:00
Pavel V. Talanov a4c005fefd Update existing test data depending on diagnostic parameter rendering 2016-02-26 14:45:11 +03:00
Michael Bogdanov 1b94904684 Prohibited @Strictfp annotation on classes (it's not supported yet), Fix for KT-11109: Strictfp annotation do nothing when applied to class
#KT-11109 Fixed
2016-02-25 18:07:51 +03:00
Yan Zhulanow da7acd5e73 Check annotations on default property getter/setter 2016-02-02 13:14:56 +03:00
Mikhail Glukhikh d94930149b Warning for open members in objects 2016-01-26 19:04:17 +03:00
Mikhail Glukhikh e4f7446bec JvmSynthetic forbidden for delegated properties (and searched for different use-site targets) 2016-01-19 11:38:53 +03:00
Mikhail Glukhikh a2bba7c8f1 JvmField forbidden for delegated properties 2016-01-19 11:38:49 +03:00
Mikhail Glukhikh ec909d0775 Volatile forbidden for delegated properties (and checked for other use-site targets) 2016-01-19 11:38:45 +03:00
Mikhail Glukhikh b78d481bb1 delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed 2016-01-19 11:38:41 +03:00
Michael Bogdanov 91f27ba176 Report error on 'JvmStatic' annotation on const or @JvmField property
#KT-10415 Fixed
2015-12-29 17:20:07 +03:00
Michael Bogdanov ae4ca3b5bb Report JvmStatic diagnostic on primary constructor properties 2015-12-29 16:45:24 +03:00
Mikhail Glukhikh f5989aa4f2 CallableMemberDescriptor.isOverridable / ClassDescriptor.isFinal refactoring
Extra JvmField and integer constants tests
2015-12-17 18:11:41 +03:00
Mikhail Glukhikh 3fb04aceb9 Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Dmitry Petrov db42941586 Allow annotation constructor calls
in default parameter value expressions of anonymous classes
(if it is not a compile-time constant, it will be reported separately).

 #KT-10136 Fixed
2015-11-25 18:06:08 +03:00
Yan Zhulanow 33d67a3bf4 Fix JvmField applicability test data
(Annotation is not applied both to field & getter now)
2015-10-31 04:30:24 +03:00
Alexey Tsvetkov dc27363452 Remove @annotation from test data 2015-10-19 20:45:01 +03:00
Svetlana Isakova bb9f7094e0 Report 'TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH'
on call element, not on callee expression
2015-10-19 14:15:05 +03:00
Yan Zhulanow 9ae3b0fa9c Drop loading Java annotation methods as functions 2015-10-16 22:13:34 +03:00