Fix incorrect unusable-by-js warning. @JsFunction interfaces were not completely loaded by UnifyAst if the functional method was never called. This fact caused that the interface was not considered as implementable externally, which in turn confused restriction checker ending in a spurious warning. Bug: #9376 Bug-Link: https://github.com/gwtproject/gwt/issues/9376 Change-Id: I92870fde72ab864bc42db8355e283ef3fe17d2ca
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java b/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java index 702cae1..b09cc19 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
@@ -1039,7 +1039,7 @@ * that the constructor is considered reachable as it might be needed later for instanceof * and casts. */ - if (type.hasJsInteropEntryPoints() || type.isJsNative()) { + if (type.hasJsInteropEntryPoints() || type.isJsNative() || type.isJsFunction()) { fullFlowIntoType(type); } }