Support jSpecify @NullMarked and @NullUnmarked
#24840
Replies: 1 comment
|
think it would be useful to document cases where this would be very helpful, to bolster why people should PLEASE HELP ME on my PR #26456 Minecraft since 26.1 is now deobfuscated and that means it now preserves annotations, and mojang uses Let's take for example in 26.1.2 Item#use. public InteractionResult use(final Level level, final Player player, final InteractionHand hand)It lives in a NullMarked package so languages like Kotlin, when your IDE autocompletes, will correctly override this as a completely non nullable method. HOWEVER, in VSCode (or any editor using Metals), a scala project will instead give you this override signature: override def use(level: (Level)?, player: (Player)?, hand: (InteractionHand)?): (InteractionResult)? = ???this isn't kotlin, so override def use(level: Level, player: Player, hand: InteractionHand): InteractionResult = ???Of course scala doesn't actually support If anyone else has use cases (that aren't in relative niches like modding minecraft with scala, of all languages) please share! |
Uh oh!
There was an error while loading. Please reload this page.
In addition to the already supported (or ongoing development) for
@NonNulland@Nullable:It would be nice to have support for
@NullMarkedand@NullUnmarked. These 2 annotations can be set on a module/package/class and respectively mean that all items in the scope can be considered@NonNull/@Nullableunless explicitly flagged as the opposite.All reactions