This happens when the `type` implements an interface with a default method whose return type is missing from the classpath:
```
interface MissingInterface {
}
class MissingInterfaceImpl implements MissingInterface {
}
interface SomeInterface {
default MissingInterface someMethod() {
return new MissingInterfaceImpl();
}
}
class Wrapper {
SomeInterface getSomeInterface() {
return new SomeInterface() {
};
}
}
```
The use case for this is to call `ResolvedJavaType.getDeclaredMethod()` from GraalVM Native Image to check if an interface declares any default methods. When `getDeclaredMethod()` is invoked there is no reason to trigger linking of the class so no call to `link_class` should be necessary.
More over, HotSpot already stores a "has default method" flag for interfaces. It would be ideal if JVMCI can expose this.