public Void onRef(DRefPattern p) { if(!canInherit) { cannotBeInherited.add(p.getTarget()); } else { // if the whole pattern is like "A,B", we can only inherit from // either A or B. For now, always derive from A. // it might be worthwhile to have a smarter binding logic where // we pick A and B based on their 'usefulness' --- by taking into // account how many other paterns are derived from those. canInherit = false; } return null; }
public Void onRef(DRefPattern p) { if(!canInherit) { cannotBeInherited.add(p.getTarget()); } else { // if the whole pattern is like "A,B", we can only inherit from // either A or B. For now, always derive from A. // it might be worthwhile to have a smarter binding logic where // we pick A and B based on their 'usefulness' --- by taking into // account how many other paterns are derived from those. canInherit = false; } return null; }
public TypeUse onRef(DRefPattern p) { // TODO: check for enums return p.getTarget().getPattern().accept(this); }
public TypeUse onRef(DRefPattern p) { // TODO: check for enums return p.getTarget().getPattern().accept(this); }
public Void onRef(DRefPattern p) { return p.getTarget().getPattern().accept(this); }
public Void onRef(DRefPattern p) { return p.getTarget().getPattern().accept(this); }