[code-reflection] RFR: Improved error message if Reflect annotation is missing on transitive methods from kernel method [v11]

Nadeesh TV ntv at openjdk.org
Thu Jan 15 22:02:39 UTC 2026


> **Description** 
> Currently, if we miss the @**Reflect** annotation on methods called from kernel functions, no method is generated for them in the corresponding backend. This causes an error like:
> 
> `> error: implicit declaration of function 'squareitWithoutReflectAnnotation' is invalid...
> `
> **Solution** 
> - Throw error if Reflect annotation is missing on all methods called from the kernel function  that are defined in the same class as the kernel function. 
> 
> **Test** 
>   -  A new test is added at **hat.test.TestMissingReflectAnnotation#testTransitiveMethodFromKernelWithoutReflectAnnotation**

Nadeesh TV has updated the pull request incrementally with one additional commit since the last revision:

  Removed an extra new line

-------------

Changes:
  - all: https://git.openjdk.org/babylon/pull/798/files
  - new: https://git.openjdk.org/babylon/pull/798/files/7bdd1ffe..9f0ca9a1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=798&range=10
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=798&range=09-10

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/babylon/pull/798.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/798/head:pull/798

PR: https://git.openjdk.org/babylon/pull/798


More information about the babylon-dev mailing list