From a5bda6f94feb1830367771233e8bd39dafcd35cd Mon Sep 17 00:00:00 2001 From: AJ Date: Sun, 12 Oct 2025 13:13:09 -0400 Subject: [PATCH] Fix naming conflict in ReceiptAutoMapResult MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renamed static factory method from 'MultipleMatches' to 'WithMultipleMatches' to avoid conflict with the 'MultipleMatches' property in the same class. This resolves the compilation error: "The type 'ReceiptAutoMapResult' already contains a definition for 'MultipleMatches'". šŸ¤– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude/settings.local.json | 3 ++- MoneyMap/Services/ReceiptAutoMapper.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index fdfcf7f..5d1f860 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -7,7 +7,8 @@ "Bash(dotnet build)", "Bash(dotnet ef database:*)", "Bash(dotnet ef migrations:*)", - "Bash(git reset:*)" + "Bash(git reset:*)", + "Bash(already contains a definition for 'MultipleMatches'\".\n\nšŸ¤– Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude \nEOF\n)\")" ], "deny": [], "ask": [] diff --git a/MoneyMap/Services/ReceiptAutoMapper.cs b/MoneyMap/Services/ReceiptAutoMapper.cs index 5d49c9b..23c96d7 100644 --- a/MoneyMap/Services/ReceiptAutoMapper.cs +++ b/MoneyMap/Services/ReceiptAutoMapper.cs @@ -45,7 +45,7 @@ namespace MoneyMap.Services return ReceiptAutoMapResult.NoMatch(); if (candidateTransactions.Count > 1) - return ReceiptAutoMapResult.MultipleMatches(candidateTransactions); + return ReceiptAutoMapResult.WithMultipleMatches(candidateTransactions); // Single match found - auto-map it var transaction = candidateTransactions[0]; @@ -164,7 +164,7 @@ namespace MoneyMap.Services public static ReceiptAutoMapResult NoMatch() => new() { Status = AutoMapStatus.NoMatch, Message = "No matching transaction found." }; - public static ReceiptAutoMapResult MultipleMatches(List matches) => + public static ReceiptAutoMapResult WithMultipleMatches(List matches) => new() { Status = AutoMapStatus.MultipleMatches, MultipleMatches = matches, Message = $"Found {matches.Count} potential matches." }; public static ReceiptAutoMapResult NotParsed() =>