VB -> C#: = ""
should not be converted to string.IsNullOrEmpty
when Option Compare Text
#1089
Labels
output logic error
A bug where the converted output behaves differently to the input code
VB -> C#
Specific to VB -> C# conversion
VB.Net input code
https://sharplab.io/#v2:DYLgbgRgNALiBOBXAdgHwPIAcYEsD2yABAMJ4C2mAhvAKaEAqNAHjALABQAkhXvDAM6EAygE9+MGmQ7dMvAYQCyOAMbw8/PADMYAOgBqOfokrAAQpX4qOHAAqIIwFSWAXBBoyfOXlxF/34chEGEdg5OQgAW1DQAJsL2ipQ4yAAUAJSBwVkAIjhkhIIAvCQR8ADqKQBkABIATAAMAGz1aYSVJeVVdU0tmVlBpMgawDQ6ZfA4EgAyyTQpRYQARIsZ7P3Bg8Oj45M0M8hzCwByeDARyQDmq1kAoshxQvYcd3G+rkA==
Erroneous output
Expected output
Details
String.Equals
(String.op_Equality
,op_Inequality
),String.IsNullOrEmpty
, orString.CompareOrdinal
dotnet/roslyn#71835Strings composed of invisible characters (e.g. U+2060 and IVS (e.g. U+E0100)) are treated as equivalent to the empty string by VB only when
Option Compare Text
.they are always told from null.
The text was updated successfully, but these errors were encountered: