resolve Reference
fun resolveReference(ref: DeclaredReferenceExpression, scope: Scope? = currentScope): ValueDeclaration?
Resolves only references to Values in the current scope, static references to other visible records are not resolved over the ScopeManager.
Return
TODO: We should merge this function with .resolveFunction
Parameters
scope
ref