Skip to content

Commit

Permalink
Update CCF CDDL for IntersectionType to match codec
Browse files Browse the repository at this point in the history
This updates CCF-related comments using CDDL notation
to make them match the CCF codec implementation.
  • Loading branch information
fxamacker committed Oct 23, 2024
1 parent 8b27276 commit 95eb472
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 95eb472

Please sign in to comment.