Skip to content
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

will not show the errors in the enum class #739

Closed
tank59he opened this issue Dec 10, 2018 · 7 comments
Closed

will not show the errors in the enum class #739

tank59he opened this issue Dec 10, 2018 · 7 comments

Comments

@tank59he
Copy link

tank59he commented Dec 10, 2018

Issue Type: Bug

public class Thee{
public static void main(String[] args){
System.out.println(Size1.SMALL);
}
}
public enum Size1{ ### //the second "public" this shoud be confirm as a error
SMALL
,LARGE
}
//this will dont show the errors and will Compile and pass。But just print "null".Beacause compiler Ignore the wrong enum class.

Extension version: 0.35.0
VS Code version: Code 1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e, 2018-11-15T19:13:36.375Z)
OS version: Windows_NT x64 10.0.17134

@yaohaizh
Copy link
Collaborator

@tank59he Is this a standalone file?

@tank59he
Copy link
Author

no is not

@fbricon
Copy link
Collaborator

fbricon commented Dec 10, 2018

@tank59he is it part of a maven or gradle project? can you share your project?

@tank59he
Copy link
Author

@fbricon like this
image

@tank59he
Copy link
Author

tank59he commented Dec 10, 2018

if there are some error in the enum class there will have not some error report. @fbricon
like two public class in a single file. Or quote a Nonexistent Construction method.
image

@tank59he tank59he changed the title why donot show the compalie error willnot show the errors in the enum class Dec 10, 2018
@fbricon
Copy link
Collaborator

fbricon commented Dec 10, 2018

Ok so this is a standalone java file. You might have noticed the "Classpath is incomplete" warning. There's no easy way to know if that file works on its own or is part of a bigger thing, so some compilation errors are disabled on purpose.

Now, we've been working on improving the user experience in some cases, such as yours, so you should now see better feedback with the next version of vscode-java. You can try the latest CI build, see if it works better for you (See manual vsix installation instructions).

@fbricon fbricon changed the title willnot show the errors in the enum class will not show the errors in the enum class Dec 10, 2018
@tank59he
Copy link
Author

@fbricon Thank you! I got that.

@fbricon fbricon added this to the Mid December 2018 milestone Dec 10, 2018
@fbricon fbricon closed this as completed Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants