Commit Graph

14731 Commits

Author SHA1 Message Date
Ilya Gorbunov 02bb7f2f0d Remove the compiler option "Xmultifile-facades-open" 2016-03-15 14:10:33 +03:00
Natalia Ukhorskaya e2d2d696c0 Add function name to fake local variable for inline argument 2016-03-15 13:25:49 +03:00
Mikhail Glukhikh a830d80dac Values equality no more provides guarantee for their types equality (for open types or types with overridden equals) #KT-11280 Fixed 2016-03-15 11:01:39 +03:00
Michael Bogdanov 3eb6749377 Call done on when mapping transformation end 2016-03-15 10:04:28 +03:00
Alexander Udalov 4f77b02a58 Rename 'ins' -> 'Ins' in BuiltinsPackageFragment and related classes 2016-03-14 20:41:46 +03:00
Alexander Udalov 777ef32d65 Move AnnotationsImpl to frontend, delete unused DefaultAnnotationArgumentVisitor 2016-03-14 20:05:19 +03:00
Alexander Udalov 11409ec6cf Move some function type utilities from descriptors to frontend 2016-03-14 19:45:09 +03:00
Alexander Udalov 63eb6712eb Rename getParameterTypeProjectionsFromFunctionType -> getValueParameterTypesFromFunctionType
Also add getValueParametersCountFromFunctionType which doesn't create a new
list every time but only returns the number of value parameters
2016-03-14 19:45:08 +03:00
Alexander Udalov 5b7115dc38 Minor, drop deprecated KotlinBuiltIns.getExtensionFunction 2016-03-14 19:45:08 +03:00
Alexander Udalov 117d0bcf03 Fix multiple exceptions related to subtypes of function types
The main change is in FunctionsTypingVisitor#visitLambdaExpression, where we
incorrectly allowed subtypes of function types to be expected type during
resolution of lambdas

Also see EA-70485

 #KT-9820 Fixed
2016-03-14 19:24:17 +03:00
Alexander Udalov 33ff1e1e29 Use correct function to check for function type in InlineParameterChecker
There's no use of noinline/crossinline modifiers on parameters of _subtypes_ of
function types

 #KT-11411 Fixed
2016-03-14 19:24:08 +03:00
Alexander Udalov c18fab82e5 Simplify and rename function type utilities
- isFunctionType -> change the only usage in TracingStrategyForInvoke to check
  for exact function type
- isExtensionFunctionType -> change all usages to check for exact extension
  function type because extension function types are uninheritable in Kotlin
- isExactFunctionType -> isNonExtensionFunctionType
- isExactExtensionFunctionType -> isExtensionFunctionType
- isExactFunctionOrExtensionFunctionType -> isFunctionType
- isFunctionOrExtensionFunctionType -> isFunctionTypeOrSubtype
2016-03-14 19:24:07 +03:00
Alexander Udalov 2ce661af98 Rename KotlinBuiltIns.getFunctionType -> createFunctionType, move to functionTypes.kt 2016-03-14 19:24:06 +03:00
Alexander Udalov fd344561fc Move static function type utilities from KotlinBuiltIns to functionTypes.kt 2016-03-14 19:24:05 +03:00
Mikhail Glukhikh 569a5888ff do...while (true) is now considered infinite loop in CFA #KT-3896 Fixed
Also #KT-3883 Fixed
Also #KT-4986 Fixed
2016-03-14 16:13:14 +03:00
Mikhail Glukhikh 4cf3ec3df2 Minor: ControlFlowInformationProvider cleanup 2016-03-14 16:13:05 +03:00
Mikhail Glukhikh 7232c5ccc1 Minor: FILE directives fixed in two tests 2016-03-14 15:49:50 +03:00
Michael Bogdanov 92f1a20d5f New name generation for transformed when classes 2016-03-14 12:22:06 +03:00
Michael Bogdanov a72636afb8 Code clean 2016-03-14 11:26:51 +03:00
Michael Bogdanov bec6126b06 Support when mapping transformation on inlining 2016-03-14 11:24:39 +03:00
Michael Bogdanov b88260b4f9 RegenerationInfo renamed to TransformationInfo 2016-03-14 10:45:39 +03:00
Michael Bogdanov c062fff633 All regeneration infos moved to one file 2016-03-14 10:45:38 +03:00
Michael Bogdanov 56d8e4d170 Old/NewClassName funs in RefenerationInfo converted to properties 2016-03-14 10:45:38 +03:00
Michael Bogdanov bbb838765c Obtain regenerated class name through RegeneratedInfo 2016-03-14 10:45:37 +03:00
Michael Bogdanov ddd992d3dd AnonymousObjectRegenerationInfo java->kotlin convertion 2016-03-14 10:45:37 +03:00
Michael Bogdanov da76bf7b03 AnonymousObjectRegenerationInfo.java->AnonymousObjectRegenerationInfo.kt 2016-03-14 10:45:36 +03:00
Michael Bogdanov 7e3e1554fa Added canRemoveAfterTransformation method 2016-03-14 10:45:36 +03:00
Michael Bogdanov 8c9d8778eb Introduced base class for AnonymousObjectGeneration 2016-03-14 10:45:35 +03:00
Michael Bogdanov c6007c91f7 AnonymousObjectGeneration refactoring 2016-03-14 10:45:35 +03:00
Michael Bogdanov a0f050fc69 Removed AnonymousObjectGeneration from RegeneratedClassContext 2016-03-14 10:45:34 +03:00
Mikhail Glukhikh f76efb68f2 Strictfp on a class is now a warning #KT-11109 Fixed 2016-03-12 13:17:11 +03:00
Alexander Udalov 90a48d3b35 Minor, move some utilities out of FunctionDescriptorUtil 2016-03-11 21:11:24 +03:00
Alexander Udalov 994dc46bcd Write nullability annotations on extension receiver parameters
#KT-5429 Fixed
2016-03-11 15:20:32 +03:00
Pavel V. Talanov 597c571f25 Fix diagnostic range when some qualifier is unresolved in "@a.b.c.Anno"
#KT-7747 Fixed
2016-03-11 15:00:02 +03:00
Pavel V. Talanov 5de4ce6f57 Minor, FunctionCodegen: add additional logging on missing function descriptor
Trying to diagnose light class building failures
2016-03-10 19:49:04 +03:00
Pavel V. Talanov fc16d7c4fd Refactor, minor: extract exception logging to an util object 2016-03-10 19:49:03 +03:00
Pavel V. Talanov 9a5650a045 Add KtPsiFactory#createFileWithLightClassSupport
Allows to create light classes for KtFile built from text
2016-03-10 19:41:59 +03:00
Pavel V. Talanov 4246c7f326 Refactor: Provide API to create KtLightClassForFacade by synthetic file 2016-03-10 19:41:57 +03:00
Pavel V. Talanov 725f128b64 Minor: remove obsolete properties from KtLightClassForFacade 2016-03-10 19:41:55 +03:00
Michael Bogdanov c38f28fb08 Restore last inline function call site line number on lambda inlining into @InlineOnly function 2016-03-10 17:08:17 +03:00
Denis Zharkov 151e55b2fa Use descriptors for building SAM constructors
It helps to get rid of semantics duplicating and fixes known bugs

- SOE in OnlyAbstractMethodFinder.find
- type enhancement for SAM constructors

 #KT-11287 Fixed
 #KT-11322 Fixed
 EA-77989 Fixed
2016-03-10 16:49:00 +03:00
Denis Zharkov b8b48c5f98 Extract common logic into AbstractTypeConstructor
Mostly it's about detecting loops in supertypes

Test data changes:
- Loops are being disconnected in Java classes too
- functions.kt: loops disconnection mechanism runs supertypes calculation,
so when we start check T it forces F' supertypes calculation, that ends
with CYCLIC_GENERIC_UPPER_BOUND reported on F

 #KT-11287 In Progress
2016-03-10 16:49:00 +03:00
Nikolay Krasko d45fc3bad7 Avoid warnings from idea core during file system initialization on Windows.
Do not use idea custom file system for now.
See FileSystemUtil.java and IdeaWin32.java files for details.
2016-03-10 13:32:08 +03:00
Nikolay Krasko 518bd76f35 Don't write false values in SetSlice to binding context
Optimization is significant for USED_AS_RESULT_OF_LAMBDA slice
2016-03-10 13:30:02 +03:00
Nikolay Krasko 71f91c5ce7 Attempt to drop debug name for traces 2016-03-10 13:30:01 +03:00
Michael Bogdanov 1a5bf33190 Fix for KT-11034: Private set with @JvmStatic lateinit var doesn't compile
#KT-11034 Fixed
2016-03-10 10:17:27 +03:00
Pavel V. Talanov c3a1643c6c Add test for obsolete KT-6481 Mark deprecated constructor calls with strikethrough 2016-03-09 18:41:00 +03:00
Alexander Udalov eef3631b8a Improve toString() for lambdas and function expressions
#KT-9952 Fixed
2016-03-09 10:49:26 +03:00
Alexander Udalov bab127ad33 Remove some legacy codegen tests, move some to generated 2016-03-09 10:25:38 +03:00
Alexander Udalov f8dfaf4599 Merge boxWithJava testData into box, delete BoxWithJava test 2016-03-09 10:25:38 +03:00