Skip to content

Commit

Permalink
apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Aug 1, 2023
1 parent b6d1364 commit 04ffc9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/cadence/language/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ some.f.contains(0)

## Entitlements

Entitlements are a unique feature of Cadence that provide granular access control to each member of a struct or resource.
Entitlements provide granular access control to each member of a composite.
Entitlements can be declared using the following syntax:

```cadence
Expand All @@ -231,6 +231,7 @@ entitlement F
```

creates two entitlements called `E` and `F`.

Entitlements can be imported from other contracts and used the same way as other types.
If using entitlements defined in another contract, the same qualified name syntax is used as for other types:

Expand Down Expand Up @@ -406,7 +407,7 @@ Entitlement mappings need not be 1:1; it is valid to define a mapping where mult
Entitlement mappings preserve the "kind" of the set they are mapping; i.e. mapping an "and" set produces an "and" set, and mapping an "or" set produces an "or" set.
Because "and" and "or" separators cannot be combined in the same set, attempting to map "or"-separated sets through certain complex mappings may result in a type error. For example:

```
```cadence
entitlement mapping M {
A -> B
A -> C
Expand Down
2 changes: 1 addition & 1 deletion docs/cadence/language/intersection-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Intersection Types
sidebar_position: 16
---

Interface types cannot be referenced directly;
Interface types cannot be used in type annotations directly;
instead they must be used as part of intersection types.
An intersection type represents a value that conforms to all of the interfaces listed in the intersection.

Expand Down

0 comments on commit 04ffc9b

Please sign in to comment.