lib.modules: inline mergedType into a lower scope

This will only be used if `res ? type` (which is barely ever true, since
there's typically only ever one decl). We can avoid the thunk in every
case.
This commit is contained in:
Eman Resu
2026-06-03 18:12:36 -04:00
committed by Eman Resu
parent aab4682e75
commit 47e958cd9a

View File

@@ -1043,10 +1043,11 @@ let
(
res: opt:
let
mergedType = res.type.typeMerge opt.options.type.functor;
typeSet =
if opt.options ? type && res ? type then
let
mergedType = res.type.typeMerge opt.options.type.functor;
in
if mergedType != null then
{
type = mergedType;