Constructor descriptors are visible through BindingContext API
This commit is contained in:
@@ -12,6 +12,7 @@ public interface BindingContext {
|
|||||||
ClassDescriptor getClassDescriptor(JetClass declaration);
|
ClassDescriptor getClassDescriptor(JetClass declaration);
|
||||||
TypeParameterDescriptor getTypeParameterDescriptor(JetTypeParameter declaration);
|
TypeParameterDescriptor getTypeParameterDescriptor(JetTypeParameter declaration);
|
||||||
FunctionDescriptor getFunctionDescriptor(JetFunction declaration);
|
FunctionDescriptor getFunctionDescriptor(JetFunction declaration);
|
||||||
|
ConstructorDescriptor getConstructorDescriptor(JetElement declaration);
|
||||||
VariableDescriptor getVariableDescriptor(JetProperty declaration);
|
VariableDescriptor getVariableDescriptor(JetProperty declaration);
|
||||||
VariableDescriptor getParameterDescriptor(JetParameter declaration);
|
VariableDescriptor getParameterDescriptor(JetParameter declaration);
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.jetbrains.jet.lang.resolve;
|
|||||||
|
|
||||||
import com.intellij.psi.PsiElement;
|
import com.intellij.psi.PsiElement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.psi.*;
|
import org.jetbrains.jet.lang.psi.*;
|
||||||
import org.jetbrains.jet.lang.types.*;
|
import org.jetbrains.jet.lang.types.*;
|
||||||
|
|
||||||
@@ -137,6 +138,12 @@ public class BindingTraceContext implements BindingContext, BindingTrace {
|
|||||||
return expressionTypes.get(expression);
|
return expressionTypes.get(expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public ConstructorDescriptor getConstructorDescriptor(@NotNull JetElement declaration) {
|
||||||
|
return constructorDeclarationsToDescriptors.get(declaration);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeclarationDescriptor resolveReferenceExpression(JetReferenceExpression referenceExpression) {
|
public DeclarationDescriptor resolveReferenceExpression(JetReferenceExpression referenceExpression) {
|
||||||
return resolutionResults.get(referenceExpression);
|
return resolutionResults.get(referenceExpression);
|
||||||
|
|||||||
Reference in New Issue
Block a user