Skip to content

Commit 75268ea

Browse files
Merge branch 'master' into claude/fix-issue-1242-winforms-nullref
2 parents 5889f2d + 68d3696 commit 75268ea

File tree

3 files changed

+52
-9
lines changed

3 files changed

+52
-9
lines changed

Tests/CSharp/MemberTests/DefaultMemberAttributeTests.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,45 @@ public void S()
4949
y.Caption = ""World"";
5050
}
5151
}
52+
");
53+
}
54+
55+
/// <summary>
56+
/// Regression test for https://github.com/icsharpcode/CodeConverter/issues/1091
57+
/// When an interface has [DefaultMember(""Value"")] and VB code explicitly accesses .Value,
58+
/// the converter must NOT strip the .Value member access in the C# output.
59+
/// </summary>
60+
[Fact]
61+
public async Task Issue1091_ExplicitAccessToDefaultMemberPropertyIsPreservedAsync()
62+
{
63+
await TestConversionVisualBasicToCSharpAsync(
64+
@"
65+
<System.Reflection.DefaultMember(""Value"")>
66+
Public Interface IWithDefaultValue
67+
Property Value As Object
68+
End Interface
69+
70+
Public Module Module1
71+
Sub Test(p As IWithDefaultValue)
72+
Dim v = p.Value
73+
p.Value = v
74+
End Sub
75+
End Module", @"using System.Reflection;
76+
77+
[DefaultMember(""Value"")]
78+
public partial interface IWithDefaultValue
79+
{
80+
object Value { get; set; }
81+
}
82+
83+
public static partial class Module1
84+
{
85+
public static void Test(IWithDefaultValue p)
86+
{
87+
var v = p.Value;
88+
p.Value = v;
89+
}
90+
}
5291
");
5392
}
5493
}

web/package-lock.json

Lines changed: 12 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"@monaco-editor/react": "^4.7.0",
16-
"axios": "^1.13.5",
16+
"axios": "^1.15.0",
1717
"bootstrap": "^5.3.8",
1818
"monaco-editor": "^0.55.1",
1919
"react": "^19.2.4",

0 commit comments

Comments
 (0)