History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-23342
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Zhuravlev
Reporter: Alexander Chernikov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Compiler internal error is reported for a case with unreachable statement

Created: 18 Nov 07 20:12   Updated: 18 Nov 07 20:12
Component/s: Compiling Project
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,560


 Description  « Hide
Tested code with unreachable statement:
import java.io.File;
import java.io.IOException;
import java.io.FileOutputStream;

public class OpenedFile {
  public static void main(String[] argv) throws IOException {
	File fo = new File("fo.txt");
	if (!fo.exists()) {
	  fo.createNewFile();
	}
	FileOutputStream fos = new FileOutputStream(fo);
	fos.write("Line 1\n".getBytes());
	fos.write("Line 2\n".getBytes());
	while (true);
	fos.close();
  }
}

Compile project or file in IDEA. Get messages in the tool window:

Information:C:\...\OpenedFile.java:22: unreachable statement.
Information:Compilation completed with 1 error and 0 warnings.
Information:1 error.
Information:0 warnings.
Error:Compiler internal error. Process terminated with exit code 1.

And there is no navigation to problem file from any line of the output.
This is a bit inconvenient. Is it possible to provide messages with navigation and mark with "error" the actual problem message?



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.