Commit Graph

24 Commits

Author SHA1 Message Date
Roman Elizarov e2713501ce Rename SuccessOrFailure to Result and hide Failure from ABI
* The members of Result are isSuccess, isFailure, exceptionOrNull, getOrNull
* The rest of API is implemented via inline-only extensions
* There are two internal functions to hide detailed mechanics of an internal
  Result.Failure class: createFailure and throwOnFailure
* Result.toString is explicit: either Success(v) or Failure(x)

See KT-26538
2018-09-09 11:34:31 +03:00
Ilya Gorbunov d57e1bb68b Migrate stepping and evaluation tests to the new coroutine API 2018-08-30 14:50:31 +03:00
Natalia Selezneva dbd7ceb5fd Fix Evaluate Expression for inline functions from multifile package class.
Find main class generated for debugger by its name instead of relativePath length.
 #KT-22311 Fixed
2018-01-16 16:00:32 +03:00
Nikolay Krasko 6456f4ed98 Test step into for Java constructor with SAM conversion
Additional test for KT-21538

 #KT-21538 Fixed
2017-12-15 16:14:50 +03:00
Nikolay Krasko d6cface66f Make isFromJava check work for SAM adapter extension descriptors (KT-21538)
Consider all callable descriptor in JavaClassDescriptor to be from Java.

This is used to check if smart step into should be intercepted by Kotlin
handler or delegated to Java.

 #KT-21538 Fixed
2017-12-15 16:14:50 +03:00
Nikolay Krasko 3ffd63a17c Attempt for fix flaky debugger tests - wait for the resume before exit 2017-06-21 17:49:03 +03:00
Nikolay Krasko 2719016539 Fix search of correspondent call expression by element (KT-11234)
getStrictParentOfType() looks for nearest parent of given type

In complex expressions like:

SamConversion.doAction({
  inlineCall {
    {
      // here <--
    }()
  }
})

doAction was found twice, while inlineCall was skipped.

See code:
// call(param, { <it> })
lambdaExpression?.typedParent<KtValueArgument>()?.typedParent<KtValueArgumentList>()?.typedParent<KtCallExpression>() ?:

// call { <it> }
lambdaExpression?.typedParent<KtLambdaArgument>()?.typedParent<KtCallExpression>()

 #KT-11234 Fixed
2017-03-10 14:58:13 +03:00
Denis Zharkov 1d5144b168 Move coroutine-related diagnostic tests to run them with stdlib
It's necessary because all coroutine related declarations (Continuation, etc)
are now in the stdlib
2017-01-27 23:24:13 +03:00
Nikolay Krasko 649ec9a73d Check that breakpoints work in suspend function without suspension points 2017-01-25 16:46:33 +03:00
Natalia Ukhorskaya f6bb70aad1 Debugger: allow to evaluate 'this' and fields in java files 2016-08-16 09:08:34 +03:00
Natalia Ukhorskaya 6a04cd39b2 Debugger: allow to evaluate kotlin expressions in java files
#KT-7549 Fixed

 If the context is inside PsiJavaFile, get list of all local variables available in current frame (this logic was removed in 29778311e8 01.12.2015 Drop unnecesary logic about additional context for lambda in debugger). For each variable create KtProperty inside top-level KtFunction in KtFile and set it as contextElement for KtCodeFragment. This file should have all imports from PsiJavaFile. We do not create properties on top-level because they will be highlighted as top-level vals/vars.
2016-08-03 17:51:49 +03:00
Natalia Ukhorskaya d42823d4ee Debugger: cannot evaluate expression with raw types
#KT-11831 Fixed
2016-04-15 15:58:07 +03:00
Natalia Ukhorskaya 102edd5a0e Debugger: do not insert array in imports 2016-04-04 12:30:46 +03:00
Natalia Ukhorskaya 589d7007fc Skip additional visibility check for java classes in debug mode 2016-03-18 15:19:03 +03:00
Natalia Ukhorskaya c5d788d049 Debugger: do not put breakpoints at lines from another file in case of inline function 2016-02-17 15:08:56 +03:00
Natalia Ukhorskaya 42927bb078 Make function delegated to sam adapter synthetic 2016-02-17 15:08:53 +03:00
Natalia Ukhorskaya 41e7c3d70b Debugger: generate package parts only for debug file
#KT-10126 Fixed
2016-01-14 13:38:59 +03:00
Natalia Ukhorskaya f699adda33 Stepping: skip methods deleting to static method call of DefaultImpl.
Support smart step into interface methods with implementation
 #KT-4803 Fixed
2015-12-11 16:21:05 +03:00
Natalia Ukhorskaya 17a564495d Stepping for inline function: filter out inline function body lines from step over
#KT-9665 Fixed
2015-10-28 14:23:47 +03:00
Michael Bogdanov 48c5e3d218 Debug tests patched 2015-09-07 16:28:38 +03:00
Natalia Ukhorskaya 5d9daf3890 Refactor stepping tests 2015-05-25 16:19:00 +03:00
Natalia Ukhorskaya 74e68950f9 Evaluate expression: support inline functions from source code 2015-04-22 10:56:39 +03:00
Natalia Ukhorskaya be73ec2cc9 KotlinEvaluateExpressionTestGenerated:testSimple: add comment 2014-10-17 11:46:25 +04:00
Pavel V. Talanov e7cd4bf6cf Implement modificationTracker for CompositeDiagnostics
#KT-5981 Fixed
2014-10-10 16:46:05 +04:00