Skip to content

Safe universal methods under -Yexplicit-nulls. - #26771

Open
sjrd wants to merge 3 commits into
scala:mainfrom
dotty-staging:universal-methods-dont-npe
Open

Safe universal methods under -Yexplicit-nulls.#26771
sjrd wants to merge 3 commits into
scala:mainfrom
dotty-staging:universal-methods-dont-npe

Conversation

@sjrd

@sjrd sjrd commented Aug 10, 2026

Copy link
Copy Markdown
Member

https://contributors.scala-lang.org/t/proposal-fixing-null-methodofany-under-explicit-nulls/7504

WiP: based on #25393, and still need to deprecated Any.hashCode() and Any.equals().

Comment thread tests/explicit-nulls/run/safe-universal-methods.scala Outdated
@sjrd
sjrd force-pushed the universal-methods-dont-npe branch from 41c3c82 to 641e731 Compare August 11, 2026 11:12
@sjrd
sjrd force-pushed the universal-methods-dont-npe branch from 641e731 to 270a0c3 Compare August 11, 2026 13:20
@sjrd sjrd changed the title WiP Universal methods don't NPE Safe universal methods under -Yexplicit-nulls. Aug 11, 2026
@sjrd
sjrd marked this pull request as ready for review August 11, 2026 13:21
@sjrd
sjrd requested a review from noti0na1 August 11, 2026 13:21
@sjrd

sjrd commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Now ready for a code review.

Will need an approval of the intended change by Core.

Comment thread compiler/src/dotty/tools/dotc/core/Definitions.scala Outdated
@sjrd
sjrd force-pushed the universal-methods-dont-npe branch 2 times, most recently from 270a0c3 to 177bfad Compare August 11, 2026 15:02
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.

4 participants