Closed
Description
In the example code below I am placing some functions into a namespace to avoid clashes. (This is in answer to a question about combining two sketches). However the automated function-prototype generation seems to be suppressed inside a namespace.
namespace foo
{
// void bar ();
void fubar ()
{
bar ();
} // end of fubar
void bar ()
{
} // end of bar
} // end of namespace foo
void setup()
{
foo::fubar ();
} // end of setup
void loop()
{
} // end of loop
If you uncomment the manual function prototype near the top the code compiles OK. As written however I get the error:
/home/nick/Pictures/Blink tutorial/Example/Example.ino: In function 'void foo::fubar()':
Example:7: error: 'bar' was not declared in this scope
bar ();
^
exit status 1
'bar' was not declared in this scope
This is with IDE 1.8.1.