On Thu, 15 Jan 2026 21:21:32 GMT, Jan Lahoda <[email protected]> wrote:

> The null restricted types don't seem to be supported for top-level 
> fields/methods in compact source files:
> 
> $ cat /tmp/Compact.java 
> String! s = "";
> void main() {
> }
> $ ./build/linux-x86_64-server-release/jdk/bin/javac --enable-preview --source 
> 27 /tmp/Compact.java 
> /tmp/Compact.java:1: error: null restriction not supported in this type 
> context
> String! s = "";
>       ^
> 1 error
> 
> 
> This is a simple patch to fix that (removing the `unannotatedType(boolean)` 
> method, as that is no longer used, to my knowledge. But it can be preserved, 
> if preferred.

@lahodaj 
Your change (at version 6c387da1065879ffcb0cb6141511eeae9cb9749a) is now ready 
to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1916#issuecomment-3760959988

Reply via email to