Ticket #249 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Implicit inheritance should handle annotations, too

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.3.1
Component: compiler Version: 1.3.0M1
Keywords: Cc: olaf@…

Description (last modified by stephan) (diff)

When a role class contains annotations, these should be copied to any tsub-role, too.

Change History

Changed 4 years ago by stephan

  • cc olaf@… added

Some tests are in A.1.17-otjld-copyinheritance-for-annotation-1 through A.1.17-otjld-copyinheritance-for-annotation-5.

The first test checks whether the compiler correctly sees a copy-inherited method as deprecated (essentially an issue of the RoleSplitter, though).

Subsequent tests retrieve the annotation at runtime. Kinds of annotations tested: marker, simple value, array values, multiple named members, nested annotation.

Implementation in r21512 passes all these tests. Note, that copying annotations wasn't the issue, they were already copied, but adjustment of names in copied annotations (pool indices) was missing.

Pending: annotations for fields (no bytecode copy here, so we need to re-construct annotations by some other means).

Changed 4 years ago by stephan

  • milestone set to OTDT_1.3.0

Shouldn't forget to finish this (re fields, see above).

Changed 4 years ago by stephan

  • milestone changed from OTDT_1.3.0 to OTDT_1.3.1

Changed 4 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

Tests re fields are in A.1.17-otjld-copyinheritance-for-annotation-6 through A.1.17-otjld-copyinheritance-for-annotation-9

Implementation in r21990:

  • for roles ignore if !options.storeAnnotations, need to read annotations for copying (BinaryTypeBinding)
  • reconstruct annotation decl from binding (AstConverter)

Changed 4 years ago by stephan

One more addition is in r22352, now test TeamInheritanceIntergrationTest indeed passes.

Note: See TracTickets for help on using tickets.