package com.puppycrawl.tools.checkstyle.checks.whitespace; import java.util.function.Supplier; public class InputMethodReferences3 { public static class SomeClass { public static class Nested { private Nested() { } } } public static class Nested2 { } public void methodName(V value) { Supplier t = Nested2::new; Supplier> passes = SomeClass.Nested::new; Supplier> fails = SomeClass.Nested::new; } }