Open Walkman100 opened 1 year ago
Hi, thanks for the report. This should be fixed by 9.1.2 shipping imminently.
Though when I say fixed, I specifically mean that it shouldn't error like that any more. It may still create a compile error but should be closer. Recognising with overflowing constants in VB needs some extra logic still
The output is now:
Imports System.Drawing
Imports System.Windows.Forms
Friend Class ConverterTests
Public Function test1() As Color()
Dim textColor = Color.FromArgb(CInt(&HFFCFCFCFUI))
Dim backColor = Color.FromArgb(CInt(&HFF303030UI))
Dim altTextColor = Color.FromArgb(CInt(&HFFFFFFFFUI))
Dim altBackColor = Color.FromArgb(CInt(&HFF515259UI))
Return New Color() {textColor, backColor, altTextColor, altBackColor}
End Function
End Class
If you remove the "UI" from the end of the constants (which means Unsigned Integer) then the output compiles. This is the line of code and PR that causes this to be added if anyone wants to look into it: https://github.com/icsharpcode/CodeConverter/pull/699/files#diff-4e0c26a555453c9fe21dbf2cccad6591d246e008b243026c679c0f3224070076R653-R654
Input code
Erroneous output
Expected output
Details