This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 8.2 (Build 201705191307) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0_111 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.111-b14 Reproducibility: Happens every time STEPS: * View a C++ function ACTUAL: * view successful with errors EXPECTED: no errors In the following code fragment, every line except lines ending with a '}', the return statement and the function prototype are marked with an error. Globally, i.e., in this function and others, 'size' is treated as unidentified in any context, e.g., vector.size(), string.size(), or my own creation, const ... size. The underlying issue is that erroneous errors in C++ code have persisted. Some releases are better than others, but the error messages are always there. The code compiles successfully, and by inspection, the errors are not correct. As you can see below, variables are marked as "Unable to resolve" in their definition. The error message are more than just annoying. Their voluminous nature hides legitimate issues. Is there anything that can be done to remove these errors? <code> bool MinimalSolver::weight1() { const long size = partition.size(); // [1] error for(long ndx = 0; ndx < numKeywords; ndx++) { // [2] error long sum = 0; // [3] error const string& part = ref[ndx].part; [4] error for(long j = 0; j < size; j++) { // [5] error sum += (size - j)*((part[j] - ' ') * (part[j] - ' ')); // [6] error } ref[ndx].weight = (double)sum; // [7] error } return true; }; // bool MinimalSolver::weight1() </code> Detected errors [1] Unexpected token ; [1] Unable to resolve identifier size' [1] Unable to resolve template based identifier size [2] Unable to resolve identifier ndx. [2] Unable to resolve identifier numKeywords [3] Unable to resolve identifier sum. [4] Unable to resolve part. [4] Unable to resolve ref. [4] Unable to resolve ndx. [5] Unable to resolve j. [5] Unable to resolve size. [6] Unable to resolve sum. [6] Unable to resolve size. [6] Unable to resolve j. [6] Unable to resolve part. [7] Unable to resolve ref.
Created attachment 165549 [details] IDE log
Created attachment 165551 [details] this fragment has not errors. bug in other line in this file
You forgot '//' in '[4] error' line. But it is not a your original problem. Main error in you test case is 'Unexpected token ;' It is critical error. C++ parser failed and can't parse code below, therefore you see a lot of "Unable to resolve" messages. Can you attach your "bad" file.