You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(376): rec func "go" was misintrepreting param "ms" (middlewares)
Issue found while trying to run the Star Wars API sample.
Somehow, in the pattern matching branch "None -> go ctx ms", "go" was being
reevaluated to be a function whose ctx parameter is of type unit and the
'res type of the containing function runMiddlewares was being
reevaluated to be IExecutorMiddleware (something like a parameterless ExecutorMiddleware
fetcher), although ctx was clearly initially set to be a
SchemaCompileContext and 'res a "unit" because of the type of the
"compileSchema" function passed as parameter in a later function call.
However, ms is always supposed to be a list of middlewares yet it was
being defined as a generic list, more specifically: the type definition was implicit. By adding
an explicit hint to the compiler in the code that "m" is an IExecutorMiddleware (and therefore "ms" a list thereof),
the compiler no longer had a misinterpretation issue with the recursive "go" function
and the Star Wars API sample now starts successfully.
0 commit comments