Skip to content

Commit

Permalink
Mark container types as non-primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdrag00nv2 committed Dec 4, 2023
1 parent 9336753 commit e2ab9ed
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions runtime/sema/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ func (t *OptionalType) IsResourceType() bool {
}

func (t *OptionalType) IsPrimitiveType() bool {
return t.Type.IsPrimitiveType()
return false

Check warning on line 678 in runtime/sema/type.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type.go#L677-L678

Added lines #L677 - L678 were not covered by tests
}

func (t *OptionalType) IsInvalidType() bool {
Expand Down Expand Up @@ -2684,7 +2684,7 @@ func (t *VariableSizedType) IsResourceType() bool {
}

func (t *VariableSizedType) IsPrimitiveType() bool {
return t.Type.IsPrimitiveType()
return false

Check warning on line 2687 in runtime/sema/type.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type.go#L2686-L2687

Added lines #L2686 - L2687 were not covered by tests
}

func (t *VariableSizedType) IsInvalidType() bool {
Expand Down Expand Up @@ -2859,7 +2859,7 @@ func (t *ConstantSizedType) IsResourceType() bool {
}

func (t *ConstantSizedType) IsPrimitiveType() bool {
return t.Type.IsPrimitiveType()
return false

Check warning on line 2862 in runtime/sema/type.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type.go#L2861-L2862

Added lines #L2861 - L2862 were not covered by tests
}

func (t *ConstantSizedType) IsInvalidType() bool {
Expand Down Expand Up @@ -5620,8 +5620,7 @@ func (t *DictionaryType) IsResourceType() bool {
}

func (t *DictionaryType) IsPrimitiveType() bool {
return t.KeyType.IsPrimitiveType() &&
t.ValueType.IsPrimitiveType()
return false

Check warning on line 5623 in runtime/sema/type.go

View check run for this annotation

Codecov / codecov/patch

runtime/sema/type.go#L5622-L5623

Added lines #L5622 - L5623 were not covered by tests
}

func (t *DictionaryType) IsInvalidType() bool {
Expand Down

0 comments on commit e2ab9ed

Please sign in to comment.