From 6d24a3b76af8e0d968554928df0eb6adb949dd64 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 17 Mar 2026 17:03:55 +0800 Subject: [PATCH] refactor: update toMethodIndexEntry to return a tuple instead of MethodIndexEntry --- compiler/ast2nif.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/ast2nif.nim b/compiler/ast2nif.nim index a8098f8274..10ecb9bd87 100644 --- a/compiler/ast2nif.nim +++ b/compiler/ast2nif.nim @@ -56,12 +56,12 @@ proc toConverterIndexEntry*(config: ConfigRef; converterSym: PSym): (nifstreams. # Fallback: return empty entry result = (nifstreams.SymId(0), nifstreams.SymId(0)) -proc toMethodIndexEntry*(config: ConfigRef; methodSym: PSym; signature: string): MethodIndexEntry = - ## Converts a method symbol to a MethodIndexEntry. +proc toMethodIndexEntry*(config: ConfigRef; methodSym: PSym; signature: string): (nifstreams.SymId, nifstreams.StrId) = + ## Converts a method symbol/signature to a method index entry. let methodSymName = methodSym.name.s & "." & $methodSym.disamb & "." & cachedModuleSuffix(config, methodSym.itemId.module.FileIndex) - result = MethodIndexEntry( - fn: pool.syms.getOrIncl(methodSymName), - signature: pool.strings.getOrIncl(signature) + result = ( + pool.syms.getOrIncl(methodSymName), + pool.strings.getOrIncl(signature) ) proc toClassSymId*(config: ConfigRef; typeId: ItemId): nifstreams.SymId =