Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

clutz: Union of two generic functions is Function #715

Open
ribrdb opened this issue Mar 22, 2018 · 0 comments
Open

clutz: Union of two generic functions is Function #715

ribrdb opened this issue Mar 22, 2018 · 0 comments

Comments

@ribrdb
Copy link

ribrdb commented Mar 22, 2018

The following: (reduced from goog.soy.renderAsElement)

/**
 * @param {?function(T, Object<string, *>=):*|?function(T, null=, Object<string, *>=):*} t
 * @param {T=} d 
 * @template T
 */
renderAsElement = function(t, d) {}

becomes function renderAsElement < T > (t : Function | null , d ? : T ) : void
Either function type on its own gets correctly converted. Also if I change the T to string, the union gets correctly converted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant