IDE 1.6.12
class aClass {
public :
aClass(void);
int aClassMethod(void);
};
aClass::aClass(void) { }
aClass::aClassMethod(void) { return 4; }
#define XXX 1
aClass anObj;
void setup() {
// put your setup code here, to run once:
}
int foo(void) { return 3; }
void bar(void) { }
void bar2(void) { }
void loop() {
if (foo<XXX) { bar(); }
// if (anObj.aClassMethod<XXX) { bar2(); }
}
There is two errors here. foo is a function and being incorrectly compared to XXX. The compiler seems to shrug this off thinking foo is a pointer. Technically correct? Does offer a warning.
Uncomment the next line and the compiler gets upset about the method not having its ( ). But the highlight is up where XX is defined NOT where the error occurs.
This could drive you nuts if there was a ton of code and the error highlights are somewhere else.
-jim lee