Skip to content

Conversation

@naren2605
Copy link
Contributor

warning hints on mutable methods used with immutable collections

warning hints on mutable methods used with immutable collections

Details it would be good to have hints showing some warning message("mutable method xyz cannot be used on immutable collection") when immutable collections are used with mutable methods.

example:

var immutableList = List.of(10,20);
      immutableList.add(20);
var immutableList = List.of(10,20);
      immutableList.remove(20);

@mbien as 8519 has been closed earlier with the reasons you have mentioned, i just want to bring up this pr once again and see if this meets the requirements or if still you see if this won't be possible, let me know.

cc: @lahodaj @jlahoda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant