Commit Graph

426 Commits

Author SHA1 Message Date
Alexander Udalov d19a824b14 Retain data flow info after elvis operator
#KT-2825 In Progress
2012-11-16 17:56:14 +04:00
Alexander Udalov e4cd0e004f Retain data flow info after boolean operations
#KT-2825 In Progress
2012-11-16 17:56:13 +04:00
Alexander Udalov 2e6500d848 Retain data flow info after in (contains)
#KT-2825 In Progress
2012-11-16 17:56:12 +04:00
Alexander Udalov 3358108c3f Retain data flow info after == (equals)
#KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Alexander Udalov 1fbe9b9a31 Retain data flow info after binary calls
Make autocasts in CandidateResolver when checking value argument types

 #KT-2825 In Progress
2012-11-16 17:56:11 +04:00
Svetlana Isakova 96c1564c54 added ExpressionTypingServices.deparenthesize()
(with type resolution)
2012-11-16 15:32:59 +04:00
Svetlana Isakova 1c059671ba added test for deparenthesize 2012-11-16 15:32:59 +04:00
Svetlana Isakova 41864c29b2 analyze left expression in assignment operation
when it's incomplete
2012-11-16 15:32:59 +04:00
Svetlana Isakova c4428496bd check super type qualifier
even if super resolve is unsuccessful
2012-11-16 15:32:59 +04:00
Svetlana Isakova 126f5e1668 check debug info errors in diagnostic tests 2012-11-16 15:32:59 +04:00
Svetlana Isakova e9c8be8449 complete type inference only for one candidate
(the most specific)
to avoid exponential resolve of value arguments for several candidates
where type inference is incomplete (or depends on expected type)
2012-11-12 15:32:11 +04:00
Natalia.Ukhorskaya 94fbf2bdf4 Add labels for extension properties
#KT-2824 Fixed
2012-11-12 13:23:00 +04:00
Evgeny Gerashchenko e691a0bc93 Considering variances when checking for erased casts. 2012-11-08 22:02:52 +04:00
Evgeny Gerashchenko 992d84d920 Fixed IsReified diagnostic test. Now it really checks for reified type. 2012-11-08 22:02:51 +04:00
Evgeny Gerashchenko 266313a02e Replaced List and Collection with mutable analogs. 2012-11-08 22:02:51 +04:00
Andrey Breslav 6feceaa161 PsiElement for receiver declaration in a function type
This fixes the following assertion:

EA-37795 - assert: DescriptorResolver.checkBounds

java.lang.AssertionError: (
        public val categoryName: String,
        public val defaultReoccurrenceRate: DateReoccurrence,
        datesCollection: Collection<Date>) {

	at org.jetbrains.jet.lang.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1137)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.checkTypesInClassHeaders(TypeHierarchyResolver.java:447)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.process(TypeHierarchyResolver.java:154)
	at org.jetbrains.jet.lang.resolve.TopDownAnalyzer.doProcess(TopDownAnalyzer.java:125)

Caused by misbehavior of the JetFunctionType class
2012-11-06 15:29:14 +04:00
Andrey Breslav 4cda4ce388 EA-39105 - ISE: TraceBasedRedeclarationHandler.report
Fixed:
java.lang.IllegalStateException: No declaration found found for org.jetbrains.jet.lang.descriptors.TypeParameterDescriptorImpl@...
	at org.jetbrains.jet.lang.resolve.TraceBasedRedeclarationHandler.report(TraceBasedRedeclarationHandler.java:48)
	at org.jetbrains.jet.lang.resolve.TraceBasedRedeclarationHandler.handleRedeclaration(TraceBasedRedeclarationHandler.java:39)
2012-11-06 14:32:54 +04:00
Andrey Breslav a325d86e20 Properly reporting illegal use of 'super' in extension functions 2012-11-01 19:53:22 +04:00
Andrey Breslav 20906e34ce Tests for diagnostics on this and super are moved and broken into smaller parts 2012-11-01 19:53:22 +04:00
Andrey Breslav a0cd26960a Fixing super in a package-level function 2012-11-01 18:55:14 +04:00
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