added test for full path constructor invocation

This commit is contained in:
Sergey Ignatov
2011-11-07 16:29:01 +04:00
parent 510fb25e80
commit 029e0dc9a9
14 changed files with 22 additions and 3 deletions
@@ -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()
}
}
}