Closed
Description
In the world of set-literals, an assist is presented on this snippet.
Set<String> s = new HashSet<String>();
If you perform it, and get:
Set<String> s = <String>{};
which provokes the following error:
error: The set literal type 'Set<String>' isn't of expected type 'HashSet<String>'. The set's type can be changed with an explicit generic type argument or by changing the element types. (strong_mode_invalid_cast_literal_set at ...)
As discussed in #57905, we should consider not providing the assist if it would produce errored results.
/cc @bwilkerson