Commit Graph

489 Commits

Author SHA1 Message Date
Andrey Breslav 9d538dad8a EA-36903 - ISE: JavaTypeTransformer$.visitClassType Fixed 2013-01-10 16:16:49 +04:00
Svetlana Isakova 33a82da493 supertype of error type should be an error type, not any 2013-01-10 15:55:50 +04:00
Svetlana Isakova 142d9a090c no senseless comparison for error type 2013-01-10 15:55:50 +04:00
Pavel V. Talanov 293b272a22 Fix for a problem where inner (or nested) classes were not analyzed in some situations
# KT-3124 Fixed
2013-01-09 18:38:58 +04:00
Svetlana Isakova 0b53bd25bd KT-2397 Prohibit final methods in traits with no implementation
#KT-2397 fixed
2012-12-29 20:08:10 +04:00
Svetlana Isakova 55968aabad fixed an exception from 'getConstructorReferenceExpression'
(from exception analyzer)
2012-12-29 20:08:10 +04:00
Svetlana Isakova 22d3adc89f KT-3184 Type inference seems partially broken
#KT-3184 fixed
2012-12-27 18:45:24 +04:00
Svetlana Isakova 70cde87052 checking subtype for invariant type with error generic argument may success 2012-12-26 18:58:57 +04:00
Svetlana Isakova 38cc3e39e4 test for obsolete KT-2741
#KT-2741 obsolete
2012-12-26 18:01:23 +04:00
Svetlana Isakova a299cec2eb KT-3174 Call resolver doesn't understand type is not-nullable after ?. safe call
#KT-3174 fixed
2012-12-26 16:43:59 +04:00
Svetlana Isakova 9b645589df KT-2838 Type inference failed on passing null as a nullable argument
#KT-2838 fixed
2012-12-26 14:38:53 +04:00
Svetlana Isakova e6594ed5b1 KT-2883 Type inference fails due to non-Unit value returned
#KT-2883 fixed
2012-12-26 13:53:42 +04:00
Svetlana Isakova 54dffd6aad tests for obsolete tasks
#KT-3007 obsolete
 #KT-3038 obsolete
2012-12-26 13:01:48 +04:00
Svetlana Isakova b0302246a0 HtmlTabledDescriptorRendererTest renamed to DiagnosticMessageTest 2012-12-25 19:12:01 +04:00
Svetlana Isakova 76a62d8b7d added PLACEHOLDER_FUNCTION_TYPE tests 2012-12-25 19:12:01 +04:00
Svetlana Isakova 4089ac68bd improved error reporting
when error type is a generic parameter
2012-12-25 19:12:01 +04:00
Svetlana Isakova 19e6b02da8 CANNOT_INFER_PARAMETER_TYPE reporting improvement 2012-12-25 19:12:01 +04:00
Svetlana Isakova 2077faa76a no ambiguity when overloading with different function type
(in incomplete resolve)
2012-12-25 19:12:01 +04:00
Svetlana Isakova c37d7352a5 improved reporting TYPE_MISMATCH error for function literals
(introduced EXPECTED_PARAMETER_TYPE_MISMATCH, EXPECTED_RETURN_TYPE_MISMATCH, EXPECTED_PARAMETERS_NUMBER_MISMATCH
instead of reporting TYPE_MISMATCH on the whole function literal)
2012-12-25 19:12:00 +04:00
Svetlana Isakova 972b234db6 KT-3150 Kotlin m4 don't recognize function literals
#KT-3150 fixed

 added check for PLACEHOLDER_FUNCTION_TYPE to constraint system
2012-12-25 19:12:00 +04:00
Svetlana Isakova a5cf54d370 do not miss repeated 'uninitialized' error for properties 2012-12-18 19:47:55 +04:00
Svetlana Isakova 67d0d8b1a9 fix: val can be reassigned through backing field inside its own getter 2012-12-18 19:47:54 +04:00
Svetlana Isakova 58de1cabbc update tests according to package properties check 2012-12-18 19:47:54 +04:00
Svetlana Isakova 11bc01795f check package declaration in a file
to have the right properties initialization order
not to report errors if isDeclaredLocally (only recordInitializedVariables)
2012-12-18 19:47:54 +04:00
Svetlana Isakova f697098fb4 KT-2960 Perform control flow checks for package property initializers
#KT-2960 fixed
2012-12-18 19:47:52 +04:00
Svetlana Isakova d7a60f5fed added tests for KT-2369, KT-2585 and KT-2972
KT-2369 Variable is not marked as uninitialized in 'finally' section
 #KT-2369 fixed
KT-2585 Code in try-finally is incorrectly marked as unreachable
 #KT-2585 fixed
KT-2972 Wrong "unused value" warning when finally is present
 #KT-2972 fixed
2012-12-18 16:00:26 +04:00
Svetlana Isakova 9904f21ceb added ThrowExceptionInstruction
(to store throw expression in it)
2012-12-18 16:00:26 +04:00
Svetlana Isakova 93327a3e31 check uninitialized vars inside local declarations
added parameter 'includeInsideLocalDeclarations' to getDeclaredVariables
2012-12-18 16:00:26 +04:00
Svetlana Isakova 8141229744 added edge from try start to error through finally block
KT-2845 Wrong cf-analysys for variable initialization in try..finally
 #KT-2845 fixed
todo: some errors now are reported for several times (each time when analyzing finally block)
2012-12-18 16:00:25 +04:00
Evgeny Gerashchenko 34f9ae77ba Getting super methods correctly for inheritors of Collection, etc. 2012-12-10 21:43:42 +04:00
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