internal TypeScopeImpl(CodeWorkspaceImpl ws, INamedScope parent)
            : base(ws, parent)
        {
            UniqueId = ws.GetNextTypeScopeIdentifier();
            _funcs   = new FunctionDefiner(true);
            INamedScope?p = parent;

            for (; ;)
            {
                if (p is INamespaceScope ns)
                {
                    Namespace = ns;
                    break;
                }
                p = p.Parent;
                Debug.Assert(p != null, "We eventually reached the root namespace.");
            }
        }