Skip to content

Commit

Permalink
compiler: improve binded type handling for tuple results
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Sep 9, 2024
1 parent 5f4d0ec commit 2ea11d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/julec/obj/cxx/type.jule
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ impl resultCoder {
const Array = "a"
const Reference = "r"
const Fn = "f"
const BindPrefix = "b"

static fn new(mut &tc: &typeCoder): &resultCoder {
ret &resultCoder{tc: tc}
Expand Down Expand Up @@ -408,6 +409,11 @@ impl resultCoder {
}

fn codeMut(mut self, mut &s: StrBuilder, mut &t: &TypeKind) {
if t.Binded() {
s.WriteStr(resultCoder.BindPrefix)
s.WriteStr(t.BindIdent)
ret
}
match type t.Kind {
| &Ptr:
self.ptr(s, (&Ptr)(t.Kind))
Expand Down

0 comments on commit 2ea11d9

Please sign in to comment.