Basic resolve for 'throw'
This commit is contained in:
@@ -157,7 +157,7 @@ public class BindingTraceContext implements BindingContext, BindingTrace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PsiElement getDeclarationPsiElement(DeclarationDescriptor descriptor) {
|
public PsiElement getDeclarationPsiElement(@NotNull DeclarationDescriptor descriptor) {
|
||||||
return descriptorToDeclarations.get(descriptor.getOriginal());
|
return descriptorToDeclarations.get(descriptor.getOriginal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -759,6 +759,11 @@ public class JetTypeInferrer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visitThrowExpression(JetThrowExpression expression) {
|
public void visitThrowExpression(JetThrowExpression expression) {
|
||||||
|
JetExpression thrownExpression = expression.getThrownExpression();
|
||||||
|
if (thrownExpression != null) {
|
||||||
|
JetType type = getType(scope, thrownExpression, false);
|
||||||
|
// TODO : check that it inherits Throwable
|
||||||
|
}
|
||||||
result = JetStandardClasses.getNothingType();
|
result = JetStandardClasses.getNothingType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user