use of org.eclipse.ceylon.compiler.typechecker.tree.Tree.MemberOrTypeExpression in project ceylon by eclipse.
the class SelfReferenceVisitor method visit.
@Override
public void visit(Tree.AssignmentOp that) {
super.visit(that);
if (inBody()) {
Tree.Term lt = that.getLeftTerm();
Tree.Term rt = that.getRightTerm();
if (lt instanceof Tree.MemberOrTypeExpression && rt instanceof Tree.This) {
MemberOrTypeExpression mte = (Tree.MemberOrTypeExpression) lt;
Declaration d = mte.getDeclaration();
if (d instanceof FunctionOrValue) {
FunctionOrValue fov = (FunctionOrValue) d;
if (fov.isLate()) {
// NOTE: EARLY EXIT!!
return;
}
}
}
checkSelfReference(that, rt);
}
}
use of org.eclipse.ceylon.compiler.typechecker.tree.Tree.MemberOrTypeExpression in project ceylon by eclipse.
the class BoxingVisitor method visit.
@Override
public void visit(Expression that) {
Stack<Boolean> npebs = setPEB();
super.visit(that);
resetPEB(npebs);
Term term = that.getTerm();
propagateFromTerm(that, term);
// which will need to be marked boxed
if (term instanceof MemberOrTypeExpression) {
Tree.MemberOrTypeExpression expr = (Tree.MemberOrTypeExpression) term;
if (expr.getDeclaration() instanceof Function) {
that.setUnboxed(false);
}
}
}
Aggregations