Java: Don't report lambdas (or other anon classes) as dead.

This commit is contained in:
Anders Schack-Mulligen 2019-06-28 12:58:26 +02:00
Родитель 0d4ff2d7fe
Коммит a93ecae1ae
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -38,6 +38,8 @@ predicate dead(RefType dead) {
not dead.getASupertype*().hasName("TestCase") and
// Exclude enum types.
not dead instanceof EnumType and
// Exclude anonymous classes
not dead instanceof AnonymousClass and
// Exclude classes that look like they may be reflectively constructed.
not dead.getAnAnnotation() instanceof ReflectiveAccessAnnotation and
// Insist all source ancestors are dead as well.