-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): Return ability arrow [LNG-258] #935
Conversation
LNG-258 Can't use returned ability arrow
aqua:
error:
this snippets do not pass parsing stage:
possible workaround:
But using ← should be allowed |
model/inline/src/main/scala/aqua/model/inline/raw/CallArrowRawInliner.scala
Outdated
Show resolved
Hide resolved
model/inline/src/main/scala/aqua/model/inline/raw/CallArrowRawInliner.scala
Outdated
Show resolved
Hide resolved
…Inliner.scala Co-authored-by: InversionSpaces <[email protected]>
model/inline/src/main/scala/aqua/model/inline/raw/CallArrowRawInliner.scala
Outdated
Show resolved
Hide resolved
semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: InversionSpaces <[email protected]>
CallArrowRawInliner.unfold(CallArrowRaw.ability(n, name, at, args), exportTo).flatMap { | ||
case (_, inline) => | ||
RawValueInliner | ||
.inlineToTree(inline.copy(predo = Chain.fromOption(prevInline) ++ inline.predo)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Write Inline.prepend
like Inline.append
semantics/src/main/scala/aqua/semantics/rules/ValuesAlgebra.scala
Outdated
Show resolved
Hide resolved
closure = (x: i8) -> bool: | ||
<- x > 20 | ||
|
||
MySSS = SSS(arrow = closure) | ||
MyCCCC = CCCC(simple = MySSS, arrow = MySSS.arrow) | ||
res1 <- MySSS.arrow(42) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this test the bug fix?
Let's create a separate test with:
- Abilities returned from
func
- Abilities with names
ab
,Ab
,AB
(or similar in terms of case)
Description
After this PR functions in abilities can be called with
<-
symbol, as common functions.Implementation Details
Handle
ApplyPropertyRaw
withIntoArrowRaw
forCallArrowRawTag
Checklist
Reviewer Checklist