Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 282451 Details for
Bug 562173
JDK 14.0.1 switch on enum error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
SSCCE switch on enum bug
file_562173.txt (text/plain), 735 bytes, created by
Carey Brown
on 2020-04-15 10:33:50 EDT
(
hide
)
Description:
SSCCE switch on enum bug
Filename:
MIME Type:
Creator:
Carey Brown
Created:
2020-04-15 10:33:50 EDT
Size:
735 bytes
patch
obsolete
>/* > * Java compiler: 14 > * Java compatibility: 14 > * Java JRE: 14.0.1 > * Eclipse: 2020-03 (4.15) with Java 14 support plugin > * > * Error: Cannot switch on type Bug_JDK14_Eclipse.Number. Only convertible > * int values, Strings, or enum variables are permitted. > * > * Error goes away when I set compatibility to 13. > */ >public class Bug_Jdk14_Eclipse >{ > public enum Number { ONE, TWO, THREE }; > > public static void main( String[] args ) > { > Number n = Number.TWO; > > switch( n ) // error here > { > case ONE: System.out.println( "ONE" ); break; > case TWO: System.out.println( "TWO" ); break; > case THREE: System.out.println( "THREE" ); break; > default: System.out.println( "default" ); break; > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 562173
: 282451