toString() for lazy scopes

This commit is contained in:
Andrey Breslav
2012-06-15 12:50:10 +04:00
parent 3fbe7a2c9b
commit eb8c0ec81c
3 changed files with 18 additions and 0 deletions
@@ -238,4 +238,10 @@ public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor, D
result.add(receiver);
}
}
// Do not change this, override in concrete subclasses:
// it is very easy to compromise laziness of this class, and fail all the debugging
// a generic implementation can't do this properly
@Override
public abstract String toString();
}
@@ -202,4 +202,10 @@ public class LazyClassMemberScope extends AbstractLazyMemberScope<LazyClassDescr
}
}));
}
@Override
public String toString() {
// Do not add details here, they may compromise the laziness during debugging
return "lazy scope for class " + thisDescriptor.getName();
}
}
@@ -93,4 +93,10 @@ public class LazyPackageMemberScope extends AbstractLazyMemberScope<NamespaceDes
getNamespace(packageFqName.shortName());
}
}
@Override
public String toString() {
// Do not add details here, they may compromise the laziness during debugging
return "lazy scope for package " + thisDescriptor.getName();
}
}