Skip to content

Commit

Permalink
Merge pull request #3640 from onflow/fxamacker/update-ccf-cddl-in-com…
Browse files Browse the repository at this point in the history
…ments

Update CCF CDDL for IntersectionType to match CCF codec
  • Loading branch information
fxamacker authored Oct 23, 2024
2 parents 8b27276 + 95eb472 commit 3815ec4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions encoding/ccf/decode_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,16 +610,14 @@ func (d *Decoder) decodeReferenceType(
//
// ; cbor-tag-intersection-type
// #6.143([
// type: inline-type / nil,
// types: [* inline-type]
// types: [+ inline-type]
// ])
//
// intersection-type-value =
//
// ; cbor-tag-intersection-type-value
// #6.191([
// type: type-value / nil,
// types: [* type-value]
// types: [+ type-value]
// ])
//
// NOTE: decodeTypeFn is responsible for decoding inline-type or type-value.
Expand Down
3 changes: 1 addition & 2 deletions encoding/ccf/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -1569,8 +1569,7 @@ func (e *Encoder) encodeReferenceTypeValue(typ *cadence.ReferenceType, visited c
//
// ; cbor-tag-intersection-type-value
// #6.191([
// type: type-value / nil,
// types: [* type-value]
// types: [+ type-value]
// ])
func (e *Encoder) encodeIntersectionTypeValue(typ *cadence.IntersectionType, visited ccfTypeIDByCadenceType) error {
rawTagNum := []byte{0xd8, CBORTagIntersectionTypeValue}
Expand Down
3 changes: 1 addition & 2 deletions encoding/ccf/encode_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,7 @@ func (e *Encoder) encodeReferenceTypeWithRawTag(
//
// ; cbor-tag-intersection-type
// #6.143([
// type: inline-type / nil,
// types: [* inline-type]
// types: [+ inline-type]
// ])
func (e *Encoder) encodeIntersectionType(typ *cadence.IntersectionType, tids ccfTypeIDByCadenceType) error {
rawTagNum := []byte{0xd8, CBORTagIntersectionType}
Expand Down

0 comments on commit 3815ec4

Please sign in to comment.