record (@NotNull Promise<AbstractValueHint> hintPromise, @Nullable Promise<ExpressionInfo> infoPromise) { public static CancellableHint resolved(@Nullable AbstractValueHint hint) { return new CancellableHint(Promises.resolvedPromise(hint), null); } public void tryCancel() { if (infoPromise instanceof CancellablePromise<ExpressionInfo>) { ((CancellablePromise<ExpressionInfo>)infoPromise).cancel(); } } }