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.

Bug 191581 - source editor can't dectect error of extra "static" in function definition
Summary: source editor can't dectect error of extra "static" in function definition
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 20:44 UTC by Thomas Preisler
Modified: 2014-05-20 13:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2010-11-02 20:44:49 UTC
From CR 6996634:

"static" in function definition is not allowed by compiler, parser of source editor did not dectect this
error

declaration:
	static  const MachineType *
			derive_machine_type(pid_t, bool data_model = false);
definition:
	static  const MachineType *
			derive_machine_type(pid_t, bool data_model = false)
			{

			}
*** (#1 of 1): 2010-11-01 16:05:34 PDT chihin
Comment 1 Vladimir Voskresensky 2010-11-02 20:51:02 UTC
"static" modifier for function declaration means "compilation unit local function".
compiles just fine:
---------------
static void foo();
/*
 * 
 */
int main(int argc, char** argv) {

    return 0;
}


static void foo() {
    
}
Comment 2 Vladimir Voskresensky 2010-11-02 23:59:48 UTC
corrected test case from Jean (now with C++ constructions)

class A {
public:
    static void foo();
};

/*
 *
 */
int main(int argc, char** argv) {

    return 0;
}


static  void
A::foo() {
}