If you have different declarations of the same function (decorated with excludeAnnotations) in your AppBase class
Then the compiler generates an error if you have a background ServiceDelegate (annotated with (:background)) in your project.
When removing the background ServiceDelegate from the project, the compiler compiles fine and the excludeAnnotations behave as expected.
Environment:
Mac High Sierra 10.13.3
Eclipse Oxygen.2
Steps to reproduce:
Import attached project in Eclipse
Try to compile and observe compiler error
Remove the background ServiceDelegate (BgDelegate.mc) and compile again
Observe no error and build succeeds.
Expected results:
excludeAnnotations for different versions of the same method (foo()) inside the AppBase class should be handled correctly when the project contains a background ServiceDelegate (BgDelegate.mc).
When selecting FR 935 as target, output on the console should be "Version 1"
When selecting Fenix 5 as target, output on the console should be "Version 2"
Observed results:
The following compiler error is produced:
BUILD: ERROR: fr935: ERROR: assembler: Redefinition of label (code) globals_TestExcludeAnnotationsApp_foo
BUILD: ERROR: fr935: ERROR: assembler: Redefinition of label (code) globals_TestExcludeAnnotationsApp_foo_end
BUILD: ERROR: fr935: ERROR: assembler: Cannot resolve label strVersion_2_596863690
BUILD: WARNING: fr935: The entry point globals.TestExcludeAnnotationsApp was implicitly added to the Background process since it contains declarations annotated with (:background). (background application)