Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Jan 5, 2024
1 parent c46d84e commit f5f26f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrations/entitlements/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func ConvertValueToEntitlements(
) interpreter.Value {

var staticType interpreter.StaticType
// during a real migration these two reference cases will not be hit, but they are here for easier testing
// for reference types, we want to use the borrow type, rather than the type of the referenced value
switch referenceValue := v.(type) {
case *interpreter.EphemeralReferenceValue:
Expand Down Expand Up @@ -181,6 +182,7 @@ func ConvertValueToEntitlements(
}

switch v := v.(type) {
// during a real migration these two reference cases will not be hit, but they are here for easier testing
case *interpreter.EphemeralReferenceValue:
entitledReferenceType := entitledType.(*sema.ReferenceType)
staticAuthorization := interpreter.ConvertSemaAccessToStaticAuthorization(inter, entitledReferenceType.Authorization)
Expand Down

0 comments on commit f5f26f6

Please sign in to comment.