Commit Graph

2858 Commits

Author SHA1 Message Date
Alexander Udalov 77e0d275db Remove unreachable code in AnnotationDescriptorDeserializer
Kotlin classes should only be discoverable by VirtualFileFinder
2013-09-06 21:28:49 +04:00
Alexander Udalov 9d2add81f8 Don't break the world if enum in annotation isn't found 2013-09-06 21:28:49 +04:00
Andrey Breslav fca6182288 Fixed the case of "Any is/as List<*>" for erased cast diagnostic 2013-09-06 13:37:09 +04:00
Andrey Breslav fa2ea75c09 Do not add explicit visibility modifiers in Override/Implement 2013-09-05 21:59:41 +04:00
Andrey Breslav e3175c66e8 Fixing failed tests: do not report anything on casts that can never succeed 2013-09-05 15:03:37 +04:00
Andrey Breslav e3079ac667 Erased casts supported 2013-09-05 14:17:33 +04:00
Andrey Breslav 173303104e Type Unifier 2013-09-05 14:17:32 +04:00
Andrey Breslav b550687cbc Cast impossibility checking logic moved to a separate class 2013-09-05 14:17:32 +04:00
Andrey Breslav a28d211442 'Cast can never succeed' diagnostics improved 2013-09-05 14:17:32 +04:00
Andrey Breslav 9f4beece64 PlatformToKotlinClassMap injected into expression analyzers 2013-09-05 14:17:32 +04:00
Andrey Breslav 685bea6446 Extract method 2013-09-05 14:14:01 +04:00
Alexander Udalov 202524ab03 Get rid of recordSourceForSynthesized
Sam descriptors now implement a common interface
SynthesizedCallableMemberDescriptor, introduced in frontend.
BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED is no longer needed
2013-09-04 21:55:11 +04:00
Alexander Udalov 28367a412a Remove different usages of Guava and intellij-core from JDR 2013-09-04 21:55:06 +04:00
Alexander Udalov 640b05cfe9 Extract enum method utilities from DescriptorResolver
Create overloaded versions which accept JetType as a parameter to use them in
JDR where there's no deferred types
2013-09-04 21:55:05 +04:00
Alexander Udalov 4a620dfcbb Get rid of SAM_ADAPTER_FUNCTION_TO_ORIGINAL
Use SAM adapters hierarchy instead
2013-09-04 21:55:04 +04:00
Alexander Udalov 55af245867 Migrate JavaClassResolver from PSI to JavaClass
Several places are still left and need special handling.  The overall behavior
of the resolver should not change in this commit (except for maybe different
small operations like creating names, fq-names, ...)
2013-09-04 21:55:00 +04:00
Andrey Breslav db2b19c50f Support filtering diagnostics in tests 2013-09-04 13:07:25 +04:00
Svetlana Isakova 329d724c1e fixed compilation 2013-09-03 21:33:42 +04:00
Svetlana Isakova a53eae79b5 bug fixed: analyze arguments in FREE expression position 2013-09-03 19:56:20 +04:00
Svetlana Isakova b5e6568726 bug fixed: do not substitute type parameters twice
through final argument check
2013-09-03 19:50:00 +04:00
Svetlana Isakova a49dcc0dd4 analyze when entry in independent context 2013-09-03 17:05:21 +04:00
Svetlana Isakova 01826af806 rename: deparenthesizeWithNoTypeResolution -> deparenthesize 2013-09-03 13:09:16 +04:00
Svetlana Isakova d9b7dd6232 fix: find key expression recursively 2013-09-03 13:09:16 +04:00
Svetlana Isakova 3f72c7a9e1 small fixes: case with function literal in a block
analyze function literals in 'independent' mode, todo comment added
2013-09-03 13:09:15 +04:00
Svetlana Isakova c739632c57 report 'ambiguity' on reference, not on the whole expression
as other type inference errors
2013-09-03 13:09:15 +04:00
Svetlana Isakova 5a8e80399e update number types for unmapped arguments
or when there is no candidate found
2013-09-03 13:09:15 +04:00
Svetlana Isakova cf85e4de36 refactoring: moved methods 2013-09-03 13:09:14 +04:00
Svetlana Isakova 5f029c4c57 small refactoring 2013-09-03 13:09:14 +04:00
Svetlana Isakova 0084b68176 analyze incomplete 'in' expression 2013-09-03 13:09:14 +04:00
Svetlana Isakova da07d60ad6 checked for 'isBinaryExpressionDependentOnExpectedType'
both in analyzing expressions & completion phase
2013-09-03 13:09:13 +04:00
Svetlana Isakova cf22bc7c35 added checkType of TypeInfo method 2013-09-03 13:09:13 +04:00
Svetlana Isakova 70b11f6d39 refactoring: extracted methods for visiting special binary expressions 2013-09-03 13:09:13 +04:00
Svetlana Isakova 8b27c72736 removed UNKNOWN_EXPECTED_TYPE
it's NO_EXPECTED_TYPE + ContextDependency.DEPENDENT
2013-09-03 13:09:12 +04:00
Svetlana Isakova 58158ab30b ++wrap if branches in blocks 2013-09-03 13:09:12 +04:00
Svetlana Isakova a493125a75 refactoring: fixes after review
rename, removed unnecessary methods, improved test
2013-09-03 13:09:11 +04:00
Svetlana Isakova 928133b69b small fixes after review 2013-09-03 13:09:10 +04:00
Svetlana Isakova 164da12518 LabelResolver moved to ResolutionContext
(from ExpressionTypingContext)
2013-09-03 13:09:10 +04:00
Svetlana Isakova fd5a2056c1 analyze labeled function literals as usual ones
(specially as function literals, not as other expressions)
2013-09-03 13:09:10 +04:00
Svetlana Isakova 9093d4c373 wrap if branches in blocks 2013-09-03 13:09:09 +04:00
Svetlana Isakova 1861a335f6 always analyze 'if' as a call
not only if it's analyzed as an argument
2013-09-03 13:09:09 +04:00
Svetlana Isakova 5af15d607d removed obsolete use of temporary trace 2013-09-03 13:09:08 +04:00
Svetlana Isakova a6162cf5ba fixed: dataFlowInfoForArguments was not set in call candidate context 2013-09-03 13:09:08 +04:00
Svetlana Isakova 52848f6aa4 Use temporary cache when resolve function literals twice 2013-09-03 13:09:08 +04:00
Svetlana Isakova 7fce75bc1f removed unnecessary parameter
resolve argument without temporary trace
(it's resolved and put to call trace in the beginning anyway)
2013-09-03 13:09:08 +04:00
Svetlana Isakova 30b0a72c6b analyze all arguments with unknown expected type
in the beginning of call resolution process
2013-09-03 13:09:07 +04:00
Svetlana Isakova c8fc2c882d refactoring: extracted method 'getTypeOfLastExpressionInBlock' 2013-09-03 13:09:07 +04:00
Svetlana Isakova 33ab7a3789 added UNIT_EXPECTED_TYPE
use it for coercion to unit instead of repeating analysis twice
2013-09-03 13:09:07 +04:00
Svetlana Isakova 756cb3759b fixed: use function placeholder when there is no declared value parameter list
(not when there is no value parameters)
2013-09-03 13:09:06 +04:00
Svetlana Isakova 623c6e50e1 removed unused method 2013-09-03 13:09:06 +04:00
Svetlana Isakova dc51a2d238 analyze a lot of expressions in independent of context (expected type) mode 2013-09-03 13:09:05 +04:00