Make VB Remove Unnecessary Cast a bit smarter in interpolations
There are legitimate cases where removing a cast inside a string interpolation can case the open brace of the interpolation to touch the open brace on an array literal, resulting in a broken parse (i.e. `{{`). This changes the Remove Unnecesary Cast code fix to add parentheses outside of the cast rather than around the inner expression. Then, the parenthesis simplifier has been updated to correctly handle the case where an array literal touches the start of an interpolation: Dim x = $"{({})}" Fixes Issue #739.
Showing
想要评论请 注册 或 登录