Commit Graph

611 Commits

Author SHA1 Message Date
Evgeny Gerashchenko 00873b6e8c Reverted loading arrays from java with 'out' projection kind as return value.
#KT-3065
2012-11-29 17:02:43 +04:00
Alexander Udalov 9eecf22e15 Booleans are no longer Comparable 2012-11-28 17:41:36 +04:00
Alexander Udalov b23601eefe EA-40964
Don't access elements of an empty array
2012-11-28 17:41:35 +04:00
Andrey Breslav 304926005f Proper errors for cases like 'is Map' supported in 'when' 2012-11-27 21:15:37 +04:00
Andrey Breslav dff5f382ab Special diagnostics when no type arguments passed on teh right-hand side of 'is' expression
Example:

if (a is Map) // ERROR: Say 'Map<*, *>' if you don't want to pass type arguments
2012-11-27 16:47:38 +04:00
Andrey Breslav e064a50728 Error renamed 2012-11-24 15:59:17 +04:00
Andrey Breslav c849a0c4e3 Redundant/conflicting projections 2012-11-24 15:59:16 +04:00
Andrey Breslav 12fd07af08 Report an error when variance is specified for a function or property type parameter 2012-11-24 15:59:16 +04:00
Pavel V. Talanov 59e74e79c2 Test for KT-2619
Remove outdated check in WhenChecker

# KT-2619 fixed
2012-11-23 17:18:09 +04:00
Pavel V. Talanov 997e26d11e Test for KT-2890
# KT-2890 can't reproduce
2012-11-23 17:17:42 +04:00
Pavel V. Talanov 5fa069bebd Test for KT-2152
# KT-2152 can't reproduce
2012-11-23 17:17:03 +04:00
Pavel V. Talanov a7536e1ae9 Fix ClassCastException introduced in https://github.com/JetBrains/kotlin/commit/8d501bd7f4f1093bcf29165755aff3f2a945c88a 2012-11-21 21:05:30 +04:00
Svetlana Isakova 39450dd954 resolve function literal expression (as parameter) after resolve call
(therefore only once)
while resolve use FAKE_FUNCTION_TYPE as type
for function literal (which is a subtype/supertype for any function type)
2012-11-20 19:54:55 +04:00
Svetlana Isakova e8f9097127 do not mark error type
if the expression is resolved to namespace
 (EXPRESSION_EXPECTED_NAMESPACE_FOUND error)
2012-11-20 19:54:45 +04:00
Svetlana Isakova d0a6f6252d fixed: DEBUG_INFO_ERROR_ELEMENT should be visible in tests 2012-11-20 19:53:03 +04:00
Svetlana Isakova 993d3a3469 added tests for resolve
(to test performance issues)
2012-11-20 17:59:20 +04:00
Evgeny Gerashchenko 21e97b408c Loading java arrays as Array<out T> at method return type position, as well. 2012-11-20 16:16:47 +04:00
Alexander Udalov 712fafddb6 DataFlowInfo.getPossibleTypes() now returns Set
This solves some performance problems related to DataFlowInfo (lots of nested
conditions etc.)
2012-11-16 17:56:31 +04:00
Alexander Udalov 6c7b32dc03 Fix data flow info after inner loops with continue-outer
ControlStructureTypingVisitor.containsBreak() is refined and now also takes
into account continue to outer loops
2012-11-16 17:56:30 +04:00
Alexander Udalov 6b65c44d45 Optimize DataFlowInfo.and()
Instead of copying everything, we now only completely copy one data flow info
and use another as a delegation target
2012-11-16 17:56:29 +04:00
Alexander Udalov 57f18fca2e Retain data flow info after array accesses 2012-11-16 17:56:24 +04:00
Alexander Udalov ac7ee9d3f5 Retain data flow info after when-expressions
This means the subject expression and the common data flow info of all entries'
conditions
2012-11-16 17:56:23 +04:00
Alexander Udalov d0a2ba5737 Retain data flow info after is-expression 2012-11-16 17:56:22 +04:00
Alexander Udalov ef3e38071c Retain data flow info after try-finally 2012-11-16 17:56:21 +04:00
Alexander Udalov d629fe2d91 Retain data flow info after 'for' loop range expressions 2012-11-16 17:56:20 +04:00
Alexander Udalov 0b1c87a812 Retain data flow info after conditions in do-while statements 2012-11-16 17:56:20 +04:00
Alexander Udalov b0e9c7aab7 Retain data flow info after conditions in while-statements 2012-11-16 17:56:19 +04:00
Alexander Udalov ae77bf0a4e Retain data flow info after conditions in if-statements 2012-11-16 17:56:18 +04:00
Alexander Udalov 2872a0799a Retain data flow info after string template expressions 2012-11-16 17:56:17 +04:00
Alexander Udalov 950f912154 Retain data flow info after multi-declaration
#KT-2825 In Progress
2012-11-16 17:56:17 +04:00
Alexander Udalov a54e34282a Retain data flow info after assignment operations (+= etc)
#KT-2825 In Progress
2012-11-16 17:56:16 +04:00
Alexander Udalov f949d9e804 Retain data flow info after assignment statements
#KT-2825 In Progress
2012-11-16 17:56:15 +04:00
Alexander Udalov 3cbdb57d5c Retain data flow info after assignments in initializer
#KT-2825 In Progress
2012-11-16 17:56:14 +04:00
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