-
Sub-task
-
Resolution: Fixed
-
P3
-
8
Presently, there are two separate codepaths for attaching type annotations to symbols. Annotations on a base type will be attached by TypeAnnotations.separateAnnotationsKinds, while annotations on arrays, method parameters, and type parameters are attached by TypeAnnotations.findPosition/resolveFrame.
In the following example:
public $A int @B [];
@A will be attached by separateAnnotationsKinds, while @B will be attached by resolveFrame/findPosition.
This leads to confusion, errors, and unmaintainable code. There should be a single path for attaching annotations.
In the following example:
public $A int @B [];
@A will be attached by separateAnnotationsKinds, while @B will be attached by resolveFrame/findPosition.
This leads to confusion, errors, and unmaintainable code. There should be a single path for attaching annotations.