Fixed incorrect filtering of super constructors by visibility in Parameter Info

This commit is contained in:
Valentin Kipyatkov
2015-10-07 15:00:10 +03:00
parent 6ed7ac5285
commit 9b0292f4c0
2 changed files with 10 additions and 6 deletions
@@ -336,6 +336,8 @@ public class CallResolver {
assert !context.call.getExplicitReceiver().exists() : assert !context.call.getExplicitReceiver().exists() :
"Constructor can't be invoked with explicit receiver: " + context.call.getCallElement().getText(); "Constructor can't be invoked with explicit receiver: " + context.call.getCallElement().getText();
context.trace.record(BindingContext.LEXICAL_SCOPE, context.call.getCallElement(), context.scope);
JetReferenceExpression functionReference = expression.getConstructorReferenceExpression(); JetReferenceExpression functionReference = expression.getConstructorReferenceExpression();
JetTypeReference typeReference = expression.getTypeReference(); JetTypeReference typeReference = expression.getTypeReference();
if (functionReference == null || typeReference == null) { if (functionReference == null || typeReference == null) {
@@ -1,9 +1,11 @@
open class A(x: Int) { open class A(x: Int) {
protected constructor() : this(1) {}
private constructor(p: String) : this(2) {}
} }
class B(): A(<caret>5) { class B(): A(<caret>5)
fun m() {
A(3) /*
} Text: (<highlight>x: Int</highlight>), Disabled: false, Strikeout: false, Green: true
} Text: (<no parameters>), Disabled: true, Strikeout: false, Green: false
//Text: (<highlight>x: Int</highlight>), Disabled: false, Strikeout: false, Green: true */