Steps to replicate the issue (include links if applicable):
- Go to https://wikifunctions.beta.wmflabs.org/wiki/Z10744
- In the "Try this function" widget, nothing is shown
What happens?:
- I cannot run the function
What should have happened instead?:
- It should let me select the value, or preferably reference
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
My guess is that the "try this function" widget breaks because of the input type being Gregorian era, as defined here: https://wikifunctions.beta.wmflabs.org/wiki/Z10528
Gregorian Era is a so called nominal, a type that has a key that of its own type (i.e. Z10528 has one key, Z10528K1 of type Z10528). The UX tries to turn that into a literal, which in turn tries to create a literal, etc. This recursion breaks.
What we should do instead is that whenever we get to an argument of a recursive type, i.e. of a type that has a key that is itself, we should, instead of a literal, ask for a reference of that type.
I.e. what we should see here for the argument is a field which is a ZObject selector bound to the given type, i.e. to Gregorian Era.










