Dynamic reference type resolution