Okay, that's weird then - I checked it and indeed this code is in my ScriptBuilder so something must be off. That's the snippet I managed to get the issue reproduced. The error is because the meta is not remved from the source code after it's been parsed for meta:
troll.as (14): Expected method or property
troll.as (14): Instead found '['
troll.as (16): Unexpected token '}'
Here is the code:
shared class Foo
{
[replication]
int bar;
}
It's pretty minimal as you can see, I thought maybe it was extrernal keywords I used but I kept removing and I still get the above error with just these few lines.
I realized I was on 2.34.0 too (but I copied addons from 2.35.0 couple of weeks ago so it shouldn't matter), so I upgraded to 2.35.0 just to be sure and it's still there. I can't easily use WIP since there is no zip file that I can download and I'm using Conan packaging for all my dependencies. But I will check this file with asrun on WIP version separately from my project just to see if this also fails there.
Maybe it's something messed on my side - some engine option or something? I know that putting that additional code from my .patch did solve this so maybe it's some edge case. Will post once I manage to verify on WIP, meanwhile that's as far as I got.