VB -> C#: Pulling variables before the loop can rename variables in an unexpected way.
維護者通常 1 天內回覆
@Yozer 已經在處理了。
開始於 2022年7月5日。
評估
這個 Issue 還沒有評估資料。
描述
VB.Net input code
Private Sub TestMethod()
For i = 1 To 2
If i = 1 Then
Dim a As Integer
a += 1
System.Console.WriteLine(a)
End If
Next
End Sub
Erroneous output
private void TestMethod()
{
var a = default(int);
for (int i = 1; i <= 2; i++)
{
if (i == 1)
{
ph38013f178570470fb7aea44e2e2f4f41 += 1;
System.Console.WriteLine(ph38013f178570470fb7aea44e2e2f4f41);
}
}
}
Expected output
private void TestMethod()
{
var a = default(int);
for (int i = 1; i <= 2; i++)
{
if (i == 1)
{
a+= 1;
System.Console.WriteLine(a);
}
}
}
Details
- Product in use: e.g. codeconverter.icsharpcode.net / VS extension / both
- Version in use: e.g. 5.6.3 or a commit hash (if it's a 3rd party tool using this library, try one of the above) https://github.com/icsharpcode/CodeConverter/commit/dce1ab91d43e437e83e8127267436ae7bfb0bb9e
- Did you see it working in a previous version, which?
- Any other relevant information to the issue, or your interest in contributing a fix.
I can try to take a look, probably the issue is related to nested scope that is not a loop.
- 主要語言
- C#
- 星號
- 918
- 分支
- 244
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 29
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
icsharpcode/CodeConverter 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
icsharpcode/CodeConverter#1271 · 1 則留言 ·
維護者通常 1 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 52/100
icsharpcode/CodeConverter#1243 · 2 則留言 ·
維護者通常 1 天內回覆
-
VB -> C#: Enum Values as Integer可能重新可做 關聯的 PR 已關閉且未合併。 未關閉Good for coding agent VB -> C#
難度 3/5 1-2 天 新手友好度 45/100
icsharpcode/CodeConverter#1212 · 2 則留言 ·
維護者通常 1 天內回覆
-
Good for coding agent VB -> C#
難度 3/5 1-2 天 新手友好度 48/100
icsharpcode/CodeConverter#1211 ·
維護者通常 1 天內回覆
-
C# -> VB
難度 4/5 3-5 天 新手友好度 30/100
icsharpcode/CodeConverter#1171 · 7 則留言 ·
維護者通常 1 天內回覆
查看 icsharpcode/CodeConverter 的全部 Issue
相似的 Issue
-
hand-to-AI
難度 2/5 1-3 小時 新手友好度 72/100
CactuseSecurity/firewall-orchestrator#5803 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 3 天內回覆
-
bug python
難度 1/5 1 小時以內 新手友好度 88/100
ilia-sokolov/OfficeAgent.NET#89 ·
維護者通常 13 天內回覆