added test for full path constructor invocation
This commit is contained in:
+2
-2
@@ -5,11 +5,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author ignatov
|
||||
*/
|
||||
public class CallChain extends Expression {
|
||||
public class CallChainExpression extends Expression {
|
||||
private Expression myExpression;
|
||||
private IdentifierImpl myIdentifier;
|
||||
|
||||
public CallChain(Expression expression, IdentifierImpl identifier) {
|
||||
public CallChainExpression(Expression expression, IdentifierImpl identifier) {
|
||||
myExpression = expression;
|
||||
myIdentifier = identifier;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public class ExpressionVisitor extends StatementVisitor implements Visitor {
|
||||
public void visitReferenceExpression(PsiReferenceExpression expression) {
|
||||
super.visitReferenceExpression(expression);
|
||||
boolean isNullable = typeToType(expression.getType()).isNullable();
|
||||
myResult = new CallChain(
|
||||
myResult = new CallChainExpression(
|
||||
expressionToExpression(expression.getQualifierExpression()),
|
||||
new IdentifierImpl(expression.getReferenceName(), isNullable) // TODO: if type exists so id is nullable
|
||||
);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.test
|
||||
|
||||
class Library {}
|
||||
}
|
||||
|
||||
class User {
|
||||
void main() {
|
||||
Library lib = new Library();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace org.test {
|
||||
open class Library {
|
||||
}
|
||||
open class User {
|
||||
fun main() : Unit {
|
||||
var lib : Library? = org.test.Library()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user