Skip to content

Draft: Add tests with user-defined generic function type.

Jforrester requested to merge gerrit-822057 into main

This test tries to define the generic function type as a user-defined type to test option 3 of the generic function type proposal:

It mostly works. There is a small problem due to generic types not being fully evaluated (I filed, but otherwise it seems to just work.

Of course, there are caveats:

  • There is absolutely no validation that the provided function objects indeed have the signature that the type claims they have.
  • There cannot be special handling of the type in the UI if it is a purely user-defined type.
  • Types can become much more verbose. We saw the same with typed lists.
  • Things are much slower to evaluate (this is a known issue, probably due to copious amounts of unnecessary validation).

Change-Id: I2484fe29ab10e5028267914c103a92a54315a94d

Merge request reports