-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Illegal flagset combination for Java Enums in sealedStrictDescendants
#15908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
could you try calling children on one of the member values of an enum, I think it should have the same effect |
it gives the exact same error |
bishabosha
added a commit
that referenced
this issue
Nov 28, 2023
…ASTy (#19074) This PR contains the minimal forward incompatible changes of pipelining - reading Java and outline symbols from TASTy. The other changes to implement pipelining have no impact on TASTy or the standard library - so can come in a patch release. To test reading TASTy produced from Java defined classes, we add two private flags `-Yjava-tasty` and `-Yjava-tasty-output`, which are not expected to be used by any build tool. The tests allow us to write just the java signatures to TASTy, package them in a jar, and then read the Java TASTy from the classpath. - Keep Java compilation units up to Pickler phase if `-Yjava-tasty` is set. Skip phases for Java when not needed. - Add `JAVAattr` and `OUTLINEattr` TASTy attributes, `ELIDED` tree tag. `ELIDED` trees are pickled as rhs of java term definitions. `ELIDED` trees can only be unpickled if `OUTLINEattr` is present. - Java units will set the `JAVAattr` TASTy attribute. As currently we outline parse Java files we also set the `OUTLINEattr`. - In the future we might expand `OUTLINEattr` to include outline Scala typing. - `OUTLINEattr` and `JAVAattr` do not need any special flags to _read_ from the classpath, however to read outline tasty in the `-from-tasty` mode (so `tasty-inspector` and `scaladoc` are included) we do require an explicit `-Yallow-outline-from-tasty`, as method bodies are required for full functionality. - write java tasty files to a special jar, set with `-Yjava-tasty-output` this option is for testing purposes only. Fix sealedDescendants method for Java Enums. - Rename `JavaEnumTrait` flags to `JavaEnum` (reflecting the actual flags set) - test java enum in `SealedDescendantsTest` fixes #15908
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.2.1-RC1-bin-20220816-cf4dd05-NIGHTLY
While using
sealedStrictDescendants
on Java enum symbol gotTested on
java.nio.file.AccessMode
Using
symbol.children
instead works fine.Expectation
Using
symbol.sealedStrictDescendants
on Java enum symbols should work the same assymbol.children
.The text was updated successfully, but these errors were encountered: