Compiling error with no final blank line

This had cost me some sweat: when the code ends with a concluding '}' and no next (blank) line after it, I get all kind of weird compile errors. Adding a final blank line and all is well. Is that intentional?

Comments

No, that is not intentional,

No, that is not intentional, and it's not something I can replicate. A simple

void setup() {
} 

void loop() {
}

with exactly 5 lines (no blank line after the last }) compiles fine for me. Tried with different boards, cores, compilers, UECIDE versions... all fine.

Can you upload a sketch that shows the problem actually happening?

It might happen only when a

It might happen only when a blank line is missing in the last sketch, like example attached. This compiels with:

Compiling...
• Preprocessing...
• Converting binary files
• Compiling sketch...
◦ lastlinetest_combined.cpp
• Error at line 3 in file test.ino:
‣ stray '#' in program

• Error at line 3 in file test.ino:
‣ 'line' does not name a type

Compiling Failed

Attachments: 

Got it. It has to be a

Got it. It has to be a "middle" INO file (not the main INO file, and not the last alphabetically). It results in:

#include <Arduino.h>
#line 1 "/home/matt/Documents/UECIDE/lastlinetest/lastlinetest.ino"
#include <lastlinetest_proto.h>
#line 1 "/home/matt/Documents/UECIDE/lastlinetest/lastlinetest.ino"
void setup() {
} 

void loop() {
}
#line 1 "/home/matt/Documents/UECIDE/lastlinetest/test.ino"
void test(){
    int I = 10;
}#line 1 "/home/matt/Documents/UECIDE/lastlinetest/test2.ino"  <--- This is wrong
void test2(){
    float f=3.24;
}

when the files are combined. A simple enough (1 line) fix for a future release.

Pages