Conversation
There was a problem hiding this comment.
should we instead just augment checkTypeAssignableTo to check the fullTypeCheck flag?
There was a problem hiding this comment.
do not create it here. create it on demand. this will do a full bind, and unless the current operation is getSemanticDiagnositcs, this is wasted.
There was a problem hiding this comment.
i do not really care for the name that much. and this is used in only one place, so the extra layer of abstraction, is not really useful, i would just put it in getSemanticDiagnostics, to recreate if it does not exist and forget about it.
There was a problem hiding this comment.
My preference in avoiding errors is to leave only one way that will do things right. Since accessing variable directly might fail without prior check - then this only was should be "always use function, do not touch the variable"
|
👍 |
added fullTypeCheckFlag to TypeChecker
LS now uses 2 instances of typechecker:
typeInfoResolver- created viagetTypeChecker(/*fullTypeCheck*/ false)- used by quickinfo\dot completion etc..fullTypeCheckChecker- created viagetTypeChecker(/*fullTypeCheck*/ true)- used to get semantic diagnostics.fullTypeCheckparameter in thegetTypeCheckercontrols if typechecker can shortcut and answer more quickly (producing less error messages but they are still ignored whenfullTypeCheck === true)