| Summary: | An Annotation which has a field of annotations produces a compile an error | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Joseph Vincens <jvincens> | ||||
| Component: | EDT | Assignee: | Project Inbox <edt.compiler-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | pharmon | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Joseph Vincens
Created attachment 208114 [details]
jtopen annotations
In the attached there is a service services.S1 that uses the annotation IBMiProgram, this annotation has a field parameterAnnotations which can be any of the eglx.jtopen.annotations.AS400xxxx annotations.
if parameterAnnotations contains all the same type I get no error if it contains different types (like the example in S1) I see:
AS400Bin2 and AS400Bin4 are not compatible types in the expression [AS400Bin2, ..., AS400Bin4].
I came up with a workaround so this is no longer blocking me.
I found that by wrapping each annotation in the same type I'm able to create the array.
so instead of
parameterAnnotations = [
@AS400Bin2{},
@AS400Bin4{}
]
I do
parameterAnnotations = [
@AS400Parameter{annotation = @AS400Bin2{}},
@AS400Parameter{annotation = @AS400Bin4{}}
]
I still can't use a null as an array element, but at least I can continue.
Record AS400Parameter type Annotation
{ targets=[ElementKind.FieldMbr]
}
annotation any?;
end
I have committed a change to the following classes: TypeCompatibilityUtil SeeingsBlockAnnotationBindingBindingsCompletor fixed |