public void insertSymbolReference(Symbol definition, Symbol reference) {
        List<Symbol> list = symbolReferences.get(definition);
        if (list == null) {
            throw new IllegalArgumentException("Could not insert symbol reference" + reference + " before the definition is inserted");
        }

        definitionOfReference.put(reference, definition);
        list.add(reference);

        if (reference.getType() == SymbolType.RANK_PROFILE && reference.getScope() != null) {
            tryRegisterRankProfileInheritance(reference.getScope(), definition);
        }

        if (reference.getType() == SymbolType.STRUCT && reference.getScope() != null) {
            tryRegisterStructInheritance(reference.getScope(), definition);
        }

        if (reference.getType() == SymbolType.DOCUMENT_SUMMARY && reference.getScope() != null) {
            tryRegisterDocumentSummaryInheritance(reference.getScope(), definition);
        }
    }
Inserts a symbol reference into the schema index.
Make sure that he definition exists before inserting

@param definition the symbol being defined
@param reference the symbol being referenced
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/index/SchemaIndex.java