From da1578ea385e29f10eed1c2813641f37b6af6848 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 10:20:32 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #22 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Reflection/issues/22 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6cdcb42 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Reflection/issues/22 +Your prepared branch: issue-22-8ba7245c +Your prepared working directory: /tmp/gh-issue-solver-1757834428521 + +Proceed. \ No newline at end of file From faf5714ccf172a3969895bbbba1436bc420a5c15 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 10:26:59 +0300 Subject: [PATCH 2/3] Add tests for nullable numeric types CanBeNumeric property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added test cases for int?, double?, and bool? to verify they are correctly marked as CanBeNumeric - Verified existing implementation already handles nullable numeric types correctly - Added experiment code to demonstrate the functionality Fixes #22 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../NumericTypeTests.cs | 18 +++++++++++++++ csharp/experiments/NullableTest.cs | 22 +++++++++++++++++++ .../NullableTypeTest/NullableTypeTest.csproj | 14 ++++++++++++ .../experiments/NullableTypeTest/Program.cs | 16 ++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 csharp/experiments/NullableTest.cs create mode 100644 csharp/experiments/NullableTypeTest/NullableTypeTest.csproj create mode 100644 csharp/experiments/NullableTypeTest/Program.cs diff --git a/csharp/Platform.Reflection.Tests/NumericTypeTests.cs b/csharp/Platform.Reflection.Tests/NumericTypeTests.cs index 739b055..82c2f35 100644 --- a/csharp/Platform.Reflection.Tests/NumericTypeTests.cs +++ b/csharp/Platform.Reflection.Tests/NumericTypeTests.cs @@ -9,5 +9,23 @@ public void UInt64IsNumericTest() { Assert.True(NumericType.IsNumeric); } + + [Fact] + public void NullableIntCanBeNumericTest() + { + Assert.True(NumericType.CanBeNumeric); + } + + [Fact] + public void NullableDoubleCanBeNumericTest() + { + Assert.True(NumericType.CanBeNumeric); + } + + [Fact] + public void NullableBoolCanBeNumericTest() + { + Assert.True(NumericType.CanBeNumeric); + } } } diff --git a/csharp/experiments/NullableTest.cs b/csharp/experiments/NullableTest.cs new file mode 100644 index 0000000..b5a2b93 --- /dev/null +++ b/csharp/experiments/NullableTest.cs @@ -0,0 +1,22 @@ +using System; +using Platform.Reflection; + +class Program +{ + static void Main() + { + Console.WriteLine($"int? CanBeNumeric: {NumericType.CanBeNumeric}"); + Console.WriteLine($"int? IsNumeric: {NumericType.IsNumeric}"); + Console.WriteLine($"int? IsNullable: {NumericType.IsNullable}"); + Console.WriteLine($"int? UnderlyingType: {NumericType.UnderlyingType}"); + + Console.WriteLine($"double? CanBeNumeric: {NumericType.CanBeNumeric}"); + Console.WriteLine($"double? IsNumeric: {NumericType.IsNumeric}"); + + Console.WriteLine($"bool? CanBeNumeric: {NumericType.CanBeNumeric}"); + Console.WriteLine($"bool? IsNumeric: {NumericType.IsNumeric}"); + + Console.WriteLine($"string? CanBeNumeric: {NumericType.CanBeNumeric}"); + Console.WriteLine($"string? IsNumeric: {NumericType.IsNumeric}"); + } +} \ No newline at end of file diff --git a/csharp/experiments/NullableTypeTest/NullableTypeTest.csproj b/csharp/experiments/NullableTypeTest/NullableTypeTest.csproj new file mode 100644 index 0000000..eca2e86 --- /dev/null +++ b/csharp/experiments/NullableTypeTest/NullableTypeTest.csproj @@ -0,0 +1,14 @@ + + + + + + + + Exe + net8.0 + enable + enable + + + diff --git a/csharp/experiments/NullableTypeTest/Program.cs b/csharp/experiments/NullableTypeTest/Program.cs new file mode 100644 index 0000000..40ad1b7 --- /dev/null +++ b/csharp/experiments/NullableTypeTest/Program.cs @@ -0,0 +1,16 @@ +using System; +using Platform.Reflection; + +Console.WriteLine($"int? CanBeNumeric: {NumericType.CanBeNumeric}"); +Console.WriteLine($"int? IsNumeric: {NumericType.IsNumeric}"); +Console.WriteLine($"int? IsNullable: {NumericType.IsNullable}"); +Console.WriteLine($"int? UnderlyingType: {NumericType.UnderlyingType}"); + +Console.WriteLine($"double? CanBeNumeric: {NumericType.CanBeNumeric}"); +Console.WriteLine($"double? IsNumeric: {NumericType.IsNumeric}"); + +Console.WriteLine($"bool? CanBeNumeric: {NumericType.CanBeNumeric}"); +Console.WriteLine($"bool? IsNumeric: {NumericType.IsNumeric}"); + +Console.WriteLine($"string? CanBeNumeric: {NumericType.CanBeNumeric}"); +Console.WriteLine($"string? IsNumeric: {NumericType.IsNumeric}"); From 321bf141f9c8b4c3d9319c58d869123550b1fbc0 Mon Sep 17 00:00:00 2001 From: konard Date: Sun, 14 Sep 2025 10:27:48 +0300 Subject: [PATCH 3/3] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 6cdcb42..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Reflection/issues/22 -Your prepared branch: issue-22-8ba7245c -Your prepared working directory: /tmp/gh-issue-solver-1757834428521 - -Proceed. \ No newline at end of file