@@ -276,10 +276,12 @@ public <T> T opFromInfoChain(final InfoTree tree, final Nil<T> specialType) {
276276 @ SuppressWarnings ("unchecked" )
277277 OpInstance <T > instance = (OpInstance <T >) tree .newInstance (specialType
278278 .getType ());
279- Hints hints = getDefaultHints ();
280- RichOp <T > wrappedOp = wrapOp (instance , hints );
279+ var conditions = MatchingConditions .from ( //
280+ new InfoMatchingOpRequest (tree .info (), Nil .of (tree .info ().opType ())), //
281+ getDefaultHints () //
282+ );
283+ RichOp <T > wrappedOp = wrapOp (instance , conditions );
281284 return wrappedOp .asOpType ();
282-
283285 }
284286
285287 @ Override
@@ -540,12 +542,12 @@ private OpInstance<?> instantiateOp(final OpCandidate candidate,
540542 * Wraps the matched op into an Op that knows its generic typing.
541543 *
542544 * @param instance - the {@link OpInstance} to wrap.
543- * @param hints - the {@link Hints} used to create the {@link OpInstance}
545+ * @param conditions - the {@link Hints} used to create the {@link OpInstance}
544546 * @return an Op wrapping of op.
545547 */
546548 @ SuppressWarnings ("unchecked" )
547- private <T > RichOp <T > wrapOp (OpInstance <T > instance , Hints hints )
548- throws IllegalArgumentException
549+ private <T > RichOp <T > wrapOp (OpInstance <T > instance ,
550+ MatchingConditions conditions ) throws IllegalArgumentException
549551 {
550552 if (wrappers == null ) initWrappers ();
551553
@@ -572,7 +574,7 @@ private <T> RichOp<T> wrapOp(OpInstance<T> instance, Hints hints)
572574 // wrap the Op
573575 final OpWrapper <T > opWrapper = (OpWrapper <T >) wrappers .get (Types .raw (
574576 reifiedSuperType ));
575- return opWrapper .wrap (instance , this , hints );
577+ return opWrapper .wrap (instance , this , conditions );
576578 }
577579 catch (IllegalArgumentException | SecurityException exc ) {
578580 throw new IllegalArgumentException (exc .getMessage () != null ? exc
@@ -670,11 +672,7 @@ private OpRequest inferOpRequest(OpDependencyMember<?> dependency,
670672
671673 private RichOp <?> wrapViaCache (MatchingConditions conditions ) {
672674 OpInstance <?> instance = getInstance (conditions );
673- return wrap (instance , conditions .hints ());
674- }
675-
676- private RichOp <?> wrap (OpInstance <?> instance , Hints hints ) {
677- return wrapOp (instance , hints );
675+ return wrapOp (instance , conditions );
678676 }
679677
680678 /**
0 commit comments