On Wed, 11 May 2022 18:25:00 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> @RogerRiggs Actually - I'm no longer sure that this will work: >> >> >> jshell> char x = 0b10000000_00000000 >> x ==> '耀' >> >> jshell> var y = ~x >> y ==> -32769 >> >> jshell> char y = ~x >> | Error: >> | incompatible types: possible lossy conversion from int to char >> | char y = ~x; >> | ^^ > > So if x is a char, ~x seems to be an int :-( I have reverted adding constant fields. Too bad - the casts are back. ------------- PR: https://git.openjdk.java.net/jdk/pull/8656