If you have a class A and an interface B, then it's always possible that an instance of class A might implement interface B, regardless of how those two are defined. How could that be? Consider class C which is a subclass of A and which implements B: then a variable of type A might possibly refer to an instance of C, which does implement B. So that's why the compiler doesn't exclude the possibility in your example code.
I said "always" but that isn't quite right. If A is a final class which doesn't implement B, then none of its subclasses can implement B either, because it can't have any. The compiler will take that factor into account if it can; make your Gum class final and see what happens.