Commit Graph

408 Commits

Author SHA1 Message Date
Natalia.Ukhorskaya bf489c9ed8 KT-2701 Prevent redeclaration in multi-declaration
#KT-2701 Fixed
2012-10-25 19:03:36 +04:00
Andrey Breslav b5385788a3 Don't generate UNNECESSARY_SAFE_CALL on variables of generic type <T: Any?> 2012-10-25 17:05:28 +04:00
Andrey Breslav 3e38870ecc KT-2991 Don't generate UNNECESSARY_NOT_NULL_ASSERTION on variables of
generic type T:Any?

 #KT-2991 Fixed
2012-10-25 17:05:27 +04:00
Andrey Breslav 583dd1564d If t is of type T, comparison (t == null) may be true. No warning in this case 2012-10-20 23:33:50 +04:00
Andrey Breslav d58038d3ef Deparenthesize 'null' before checking the constant expression 2012-10-20 23:33:50 +04:00
Andrey Breslav e8bd42b691 KT-2729 Warn on 'T?' where 'T' has a nullable upper bound 2012-10-19 19:42:54 +04:00
Andrey Breslav 80039d8533 A warning for redundant '?' in types 2012-10-19 19:24:14 +04:00
Natalia.Ukhorskaya 62d8153ada Map java.land.Deprecated to jet.deprecated
Change testData for deprecated annotation
 #KT-2947 Fixed
2012-10-18 19:14:04 +04:00
Svetlana Isakova e7cbff14ef mark last parenthesis instead of value argument list 2012-10-16 20:14:52 +04:00
Svetlana Isakova 5da98b2bf0 KT-2330 Check visibility of getters and setters correspondingly
#KT-2330 fixed
2012-10-16 16:00:22 +04:00
Svetlana Isakova 7d768847a0 KT-2906 If function parameter/variable is invoked in closure using parenthesis syntax, in IDEA it is not highlighted as captured in closure
#KT-2906 fixed
2012-10-16 16:00:22 +04:00
Svetlana Isakova 9d89eb0e58 KT-2841 Can't infer a type for function literal parameter if the return type is error
#KT-2841 fixed
2012-10-16 16:00:22 +04:00
Svetlana Isakova 9d5f5f7adf KT-2842 Function with declared non-null receiver resolves with nullable argument receiver
#KT-2842 fixed
2012-10-02 14:20:00 +04:00
Alex Tkachman 57c27bdd37 jdk annotations for some java.sql methods, related cleanup in stdlib & tests 2012-09-27 12:01:54 +02:00
Alex Tkachman e2d514907a annotations for j.u.c.locks + related fixes of tests 2012-09-26 18:52:46 +02:00
Svetlana Isakova 67ec48eaa6 KT-2829 Local variables used only in multi-declaration are marked as unused
#KT-2829 fixed
2012-09-26 15:17:26 +04:00
Svetlana Isakova 85f3dbf4fc added annotations for Collections and Arrays 2012-09-24 14:18:04 +04:00
Andrey Breslav 936f53fcbf Don't complain about compareTo returning ERROR type instead of Int 2012-09-20 18:12:57 +04:00
Andrey Breslav 2abe2e581d AbstractStringBuilder, StringBuilder and java.io.File annotated with nullable/notnull 2012-09-20 18:12:57 +04:00
Alexander Udalov 37fd9cea08 Place inner enum into its parent's class object
#KT-2771 In Progress

ClassifierCollector now collects all enum declarations inside non-static
classes. After all declarations are done, it processes these enums: creates
a class object if it's not present, reports errors on each enum if a class
object is not allowed, and puts every enum into this class object otherwise,
recording this fact to trace.
2012-09-20 15:02:13 +04:00
Svetlana Isakova b081615e59 added tests for collections 2012-09-20 14:42:39 +04:00
Svetlana Isakova 0ccdf79051 no report 'UNNECESSARY_NOT_NULL_ASSERTION' on error types 2012-09-19 15:31:17 +04:00
Andrey Breslav c9e9175a88 EA-37399 - ISE: OverrideResolver.findInvisibleOverriddenDescriptor
Each of the duplicated methods in the subclass should get the same set of overridden descriptors
2012-09-18 22:01:39 +04:00
Andrey Breslav 5eaa5b396b Removing usages of tuples from test data
(KT-2358 Drop tuples)
 #KT-2358 In progress
2012-09-18 20:27:09 +04:00
Andrey Breslav dee5152f9b Supporting Unit.VALUE, to replace #()
#KT-2358 In Progress
2012-09-18 20:27:09 +04:00
Nikolay Krasko db830c88b4 EA-38787 Exception because of enumeration without name 2012-09-18 19:26:56 +04:00
Evgeny Gerashchenko 311325883e ++Added custom "sure" function in some diagnostic tests, because it is being removed from builtins. 2012-09-17 18:00:22 +04:00
Evgeny Gerashchenko 09502433be Added custom "sure" function in some diagnostic tests, because it is being removed from builtins. 2012-09-17 18:00:21 +04:00
Evgeny Gerashchenko 5de734c9f3 Replaced sure() invocations with '!!' operator in diagnostic tests. 2012-09-17 18:00:21 +04:00
Natalia.Ukhorskaya 694f1f45f8 KT-2714 'enum' annotation should only be allowed on classes
#KT-2714 Fixed
2012-09-17 15:27:49 +04:00
Natalia.Ukhorskaya 645b784b40 EA-38625 Fixed - Part 2 - UOE: NamespaceType.throwException 2012-09-14 14:11:45 +04:00
Natalia.Ukhorskaya 6516786979 EA-38625 Fixed - UOE: NamespaceType.throwException 2012-09-13 20:04:10 +04:00
Natalia.Ukhorskaya 60bdae9d75 Prohibit body for annotation class
#KT-1886 Fixed
2012-09-13 16:27:48 +04:00
Andrey Breslav 068c6795fe Fixing tests 2012-09-11 21:02:05 +04:00
Andrey Breslav 91a9b6539f EA-37910 - UOE: DescriptorUtils.getSubstitution
The corresponding method reworked to be less of a hack
Tests added
2012-09-11 20:52:11 +04:00
Natalia.Ukhorskaya 199f10034b KT-2744 Unneeded error message when the only super type is not resolved
#KT-2744 Fixed
2012-09-11 15:17:13 +04:00
Svetlana Isakova c03190910c test change
returned check for unimported reference to test
2012-09-10 20:15:20 +04:00
Svetlana Isakova b2b3d6273e improved test 2012-09-10 20:15:20 +04:00
Svetlana Isakova cd5521d6dc rename error 2012-09-07 19:03:07 +04:00
Alexander Udalov 67211fde40 Check componentN functions for overload conflicts 2012-09-07 19:00:05 +04:00
Alexander Udalov fbeaaf5fbb Check componentN functions for override conflicts
Check if newly generated component functions happen to override something
which they're not supposed to.
Create new slice to store mapping from annotation descriptors to
corresponding PSI elements, which is used by override checker to report
errors in data classes on.
2012-09-07 19:00:04 +04:00
Alexander Udalov c29312043c Refactor OverrideResolver.checkOverrideForMember()
Create CheckOverrideReportStrategy interface to report override errors
(will be used later for synthesized members override checks).

Add diagnostic test on OVERRIDING_FINAL_MEMBER, as no such test happened
to exist before.
2012-09-07 19:00:04 +04:00
Alexander Udalov b93db69a24 Resolve "componentN" functions for data classes
Reuse existing (but not used) VALUE_PARAMETER_AS_PROPERTY in
BindingContext to store mapping from constructor's value parameters to
property descriptors.

Create a new slice DATA_CLASS_COMPONENT_FUNCTION to store mapping from
constructor's value parameters to generated componentN functions.
2012-09-07 19:00:01 +04:00
Andrey Breslav b46187a560 KT-2739 Error type inferred for hashSet(Pair, Pair, Pair)
#KT-2739 Fixed
2012-09-07 18:24:22 +04:00
Kirill Berezin 454ad48d5b added one more test to check if overrides are resolved correctly 2012-09-06 20:28:58 +04:00
Kirill Berezin 1061e1ef69 do not generate delegates when the class already has such method either declared or delegated (report an ambiguity in this case)
Merge conflict resolved by committer
2012-09-06 20:27:43 +04:00
Natalia 4303083945 KT-322 Prohibit inheriting classes from enums
#KT-322 Fixed
2012-09-06 17:24:37 +04:00
Natalia 07cf73ecef KT-2697 Prohibit enum inheritance
#KT-2697 Fixed
2012-09-06 17:24:36 +04:00
Svetlana Isakova ef490ba8f1 test fixed after merge 2012-09-05 18:55:19 +04:00
Svetlana Isakova 7c828b9ff7 diagnostic tests changes after collections mapping 2012-09-05 18:55:16 +04:00