Thanks, this actually illustrates my point! If you are using inside an annotation a val
from the same compilation unit, then you should’t need const
, since the compiler can check if val
is a compile-time constant. If you’re using val
from another compilation unit, then you probably shouldn’t use const
because of the reasons pointed out by @Wasabi375: it breaks when the module you depend on is recompiled!