MCPcopy Create free account
hub / github.com/VKCOM/kphp / phpdoc_replace_genericTs_with_reified

Function phpdoc_replace_genericTs_with_reified

compiler/phpdoc.cpp:830–854  ·  view source on GitHub ↗

* When we have a generic function and an instantiation T=User, replace all T's inside a type hint. * We also handle @return here, that can ref to a field T::fieldName, replacing it after T is instantiated. * (note, that we don't allow ClassName::fieldName anywhere but in generics; if it's written, it will fail on type inferring) */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 5

infer_from_callFunction · 0.85
on_enter_vertexMethod · 0.85

Calls 5

has_genericT_insideMethod · 0.80
resolve_methodMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected