[#402] Make `RootAnn` == `FieldAnn`
Description
Problem: initially RootAnn
was an annotation with an unique tag, so it
differed from FieldAnn
, but I think now it is clear that it was not a
helpful idea:
- There is a LOT of cases when we have to convert between
RootAnn
andFieldAnn
, because we either have to put all annotations together (mkEntrypointsMap
) or want to apply a method working with field annotations on a root annotation (epNameFromAnn).connAnn
is pretty unsafe and its use should be limited, so using it extensively does not sounds proper. - In cases when we could pass
RootAnn
as-is without conversions, the fact thatRootAnn
/=FieldAnn
wasn't any helpful because we didn't have any field annotations in that scope (at least ones that would be easy to fetch), so this separateRootAnn
didn't really decrease the probability of making a bug.
Solution: declare root annotation as type RootAnn = FieldAnn
and
remove extra coercions.
Related issue(s)
Resolves #402 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Konstantin Ivanov