Invalid generated code for explicit defined name
The following NaBL code:
DefaultArrowDecl(l-ty, r-ty): defines Arrow Default()
generates the following Stratego code which does not compile:
nabl-def-site(child-uris__, sibl-uris__, implicits__|lang__, partition__, uniques__, uri__, states__) = ?DefaultArrowDecl(l-ty, r-ty) ; origin-track-forced(DefaultArrowDecl(id, id)|) ; match(child-uris__|c-uri1__) ; match(sibl-uris__|s-uri1__) ; match(implicits__|[])
No error is shown in the NaBL file. It does not make a difference if instead of
Submitted by Vlad Vergu on 20 May 2014 at 21:08Default()
we use"default"
.
Issue Log
On 20 May 2014 at 21:23 Gabriël Konat commented:
You can only create a definition using a bound variable from the pattern, otherwise we cannot attach a definition annotation. The workaround is to either desugar the
Default()
term into theDefaultArrowDecl
term and reference it in the defines clause, or use an implicit definition instead.This is a duplicate of https://yellowgrass.org/issue/NaBL/73.
On 20 May 2014 at 21:23 Gabriël Konat closed this issue.
On 20 May 2014 at 21:25 Vlad Vergu commented:
Thank you.
Log in to post comments