As part of an attempt to whittle down the remaining errors in google/elemental2 builds I tried to define the standardized Document.prototype.write in an extern accessible via Elemental2.
The extern looks something like:
/**
* @param {!TrustedHTML|string} text
* @return {undefined}
* @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-write
*/
Document.prototype.write = function(text) {};
This is overridden in w3c_dom2.js with
/**
* @param {!TrustedHTML|string} text
* @return {undefined}
* @see http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/html.html#ID-75233634
* @override
*/
HTMLDocument.prototype.write = function(text) {};
Unfortunately jsinterop-generator generates the overlay methods for union types in Document class like
@JsOverlay
public final void write(TrustedHTML text) {
write(Js.<Document.WriteTextUnionType>uncheckedCast(text));
}
and attempts to define a similar but different overlay in HTMLDocument like
@JsOverlay
public final void write(TrustedHTML text) {
write(Js.<HTMLDocument.WriteTextUnionType>uncheckedCast(text));
}
There does not seem to get the overriding method to use the union type and thus the overlay methods declared by the overridden method. Thus a compile error.
As part of an attempt to whittle down the remaining errors in
google/elemental2builds I tried to define the standardizedDocument.prototype.writein an extern accessible via Elemental2.The extern looks something like:
This is overridden in
w3c_dom2.jswithUnfortunately
jsinterop-generatorgenerates the overlay methods for union types inDocumentclass likeand attempts to define a similar but different overlay in
HTMLDocumentlikeThere does not seem to get the overriding method to use the union type and thus the overlay methods declared by the overridden method. Thus a compile error.