Skip to content

Commit

Permalink
EParameters store its elements in an EArray
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Jul 14, 2024
1 parent 981bbf2 commit 05d0cf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/EnumeratorMacroImpl/Types/EArray.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Mustache

struct EArray<Element> {
fileprivate let underlying: [Element]
let underlying: [Element]

init(underlying: [Element]) {
self.underlying = underlying
Expand Down
8 changes: 4 additions & 4 deletions Sources/EnumeratorMacroImpl/Types/EParameters.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Mustache

struct EParameters {
fileprivate let underlying: [EParameter]
fileprivate let underlying: EArray<EParameter>

init(underlying: [EParameter]) {
self.underlying = underlying
self.underlying = .init(underlying: underlying)
}
}

Expand Down Expand Up @@ -43,8 +43,8 @@ extension EParameters: MustacheTransformable {
let array = EArray(underlying: namesAndTypes)
return array
case "tupleValue":
if self.underlying.count == 1 {
return EArray(underlying: [underlying[0].type])
if self.underlying.underlying.count == 1 {
return EArray(underlying: [underlying.underlying[0].type])
} else {
let namesAndTypes = self
.enumerated()
Expand Down

0 comments on commit 05d0cf7

Please sign in to comment.