Skip to content

Parameter annotations fixes

Arvydas Silanskas requested to merge nma.arvydas.silanskas/Kawa:master into master

One change is making syntax check more lax, and only validate that following annotation declaration only other annotation declarations or opt type declaration appear (previously it was validating following annotation declaration or type declaration). It seems properly distinguishing between type declaration as part of pattern from type declaration following pattern as part of parameter syntax is tricky.

Other change is validating if any of method's parameters have annotations attached, and only create RuntimeParameterAnnotation attributes if at least one annotation is present. I'm not entirely sure what went wrong with creating it always. Perhaps it'd be worth restricting use of parameter annotations very narrowly and to only work how defined in testcase/annotations-on-parameter.scm (and not in any other lambda context) with a purpose of getting way to interop with java libs that rely on such functionality, but not chasing other edge cases, which would have dubious usability in practice.

Not sure why this pull request shows old commits

Merge request reports