diff --git a/src/testing/methodtest.cs b/src/testing/methodtest.cs
index fe49de88d..ec05fef72 100644
--- a/src/testing/methodtest.cs
+++ b/src/testing/methodtest.cs
@@ -258,6 +258,11 @@ public static int TestSingleDefaultParam(int i = 5)
return i;
}
+ public static decimal TestDecimalDefaultParam(decimal n = 1m)
+ {
+ return n;
+ }
+
public static int TestTwoDefaultParam(int i = 5, int j = 6)
{
return i + j;
diff --git a/tests/test_method.py b/tests/test_method.py
index e2d8d5b06..b24b525aa 100644
--- a/tests/test_method.py
+++ b/tests/test_method.py
@@ -441,6 +441,12 @@ def test_single_default_param():
assert result == 5
+def test_decimal_default_param():
+ """Test that decimal default parameters work."""
+ result = MethodTest.TestDecimalDefaultParam()
+ assert result == System.Decimal(1)
+
+
def test_one_arg_and_two_default_param():
"""Test void method with single ref-parameter."""
result = MethodTest.TestOneArgAndTwoDefaultParam(11)
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy