Repository navigation
Commit a74a328
committed
OpBuilder: default to Any return value
When the OpBuilder doesn't have an output/outType specified, we were
defaulting to Object. However this can incorrectly lead to matching
scenarios where we look for Ops with return values that Object can
be *cast to* (which will almost universally fail).
Instead we want to match Any, in that any return value is acceptable.
This change requires updates to Types/GenericAssignability to support
such Any return value scenarios, as they were checking "instanceof Any"
but not if it was Any.class (which is the scenario of the OpBuilder
using Nil<Any>, instead of new Any(), which was determined to be
undesirable).1 parent 226b224 commit a74a328
5 files changed
Lines changed: 57 additions & 44 deletions
File tree
- scijava
- scijava-ops-api
- src/main/java/org/scijava/ops/api
- templates/main/java/org/scijava/ops/api
- scijava-ops-engine/src/main/java/org/scijava/ops/engine/matcher/impl
- scijava-types/src/main/java/org/scijava/types
- inference
0 commit comments