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 181115

Summary: Source reformat fails to recognize custom types
Product: cnd Reporter: igmar <igmar>
Component: EditorAssignee: Alexander Simon <alexvsimon>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description igmar 2010-02-24 01:59:59 UTC
The source formatter has a problem recognizing typedeffed return types. An example :

typedef int bar;

struct mybar {
    int a;
};

struct foo {
    int (*func1)(void);
    struct mybar * (*func2)(void);
    bar (*func3)(void);
};

is formatted as 

typedef int bar;

struct mybar {
    int a;
};

struct foo {
    int (*func1)(void);
    struct mybar * (*func2)(void);
    bar(*func3)(void);
};

It compiles (since the missing whitespace isn't required), but for the sake of consistancy, it needs a minor fix :)