Refactor whe way TypecheckingResultsCache is updated:
all mutatiting methods extracted to Update subclass, which is
only available to the updater.
Make TypecheckingState a regular container for (unit) caches.
Make TypecheckingService responsible for managing caches.
Extract TypeModuleOwner and TypeModelHandler classes.
Get rid of QueryResultsCache, merge into TypecheckingResultsCache.
TypeModuleOwner to manage "repository" cache.
Now whether unchecked conversion is allowed is controlled
by ConvertsContext.Options of convertsTo relation.
Introduce 'erased()' term to be used in raw type params.
Drop 'uncheckedConversion' parameter in all macros.
Classifier kind:"raw" is now used only for Recover.
Allow unchecked conversions by default. Forbid for sequences.
Can't properly handle this case now.
To handle this case of no type of initializer in assignment context
need to discern cause of this "no type". If it's because of error --
then can't assign to it any type. If there were no error
(e.g. case of test) -- then type can be inferred from assignment ctx.
Anyway it's not very important corner case, can leave this test relaxed.
TypecheckingService and provider component are explicitly dependent
on SRepository.
The repository instance comes from the first opened project, which
is a dirty hack and is temporary until Typechecking Facade API
is fixed to provide appropriate instance.
To fix them need either extending incr algo to handle rules which
postpone binding logicals in principal constraints (i.e. typeOf)
(see rules in Closures for 'invoke' expression)
or rewriting these rules to not produce typeOf with free logicals.
Add 'genDecl' constraint in heads of toFunctionalCls* rules
to handle incremental changes to respective classifier.
Also fail instead of just reporting error to break execution and
report on correct node according to calling rule.
Hierarchy graph vertex can represent LUB as a simple
collection of inheritance paths.
Abstract intefaces allow to model operations such as finding
the LUB in an abstract way.
Greatly simplify code.