package org.jetbrains.debugger;

import com.intellij.openapi.util.AsyncResult;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface FunctionValue extends ObjectValue {
  /**
   * Returns position of opening parenthesis of function arguments. Position is absolute
   * within resource (not relative to script start position).
   *
   * @return position or null if position is not available
   */
  int getOpenParenLine();

  int getOpenParenColumn();

  @Nullable
  Scope[] getScopes();

  @NotNull
  AsyncResult<FunctionValue> asFunction();
}

package org.jetbrains.debugger;

import com.intellij.openapi.util.AsyncResult;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface FunctionValue extends ObjectValue {
  /**
   * You must invoke {@link #resolve} to use any function value methods
   */
  @NotNull
  AsyncResult<FunctionValue> resolve();

  /**
   * Returns position of opening parenthesis of function arguments. Position is absolute
   * within resource (not relative to script start position).
   *
   * @return position or null if position is not available
   */
  int getOpenParenLine();

  int getOpenParenColumn();

  @Nullable
  Scope[] getScopes();
}

rename "asFunction" to "resolve"