Originally reported at https://youtrack.jetbrains.com/issue/IJPL-181167
Please see the attached screenshots showing the issue.
The problem occurs with this code snippet:
class Testing {
[TestClass]Deserialize([string]$json) {
$jsonObj = [Testing]::New()
return [JsonSerializer]::Deserialize[TestClass]($json,$jsonObj.GetOptions())
}
}
The problem does not happen after removing the method call inside the parentheses:
class Testing {
[TestClass]Deserialize([string]$json) {
$jsonObj = [Testing]::New()
return [JsonSerializer]::Deserialize[TestClass]($json, $jsonObj)
}
}
Spaces around both sides of comma |
❌ Before comma enabled |
 |
| ✅ Before & after comma enabled |

Spaces around neither side of comma |
❌ After comma enabled |
 |
| ✅ Neither option enabled |
