-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
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
Metadata
Metadata
Assignees
Labels
devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)