public void addRef(AttributeAccess attr, DataType targetType, ISet<Binding> bs) { foreach (Binding b in bs) { putRef(attr, b); if (attr.Parent != null && attr.Parent is Application && b.type is FunType && targetType is InstanceType) { // method call ((FunType) b.type).SelfType = targetType; } } }