Skip to content

fix: Don't call _typeDescriptor() on reference types in Java#321

Merged
robin-aws merged 17 commits into
main-1.xfrom
robin-aws/reference-type-descriptors-fix
Feb 27, 2024
Merged

fix: Don't call _typeDescriptor() on reference types in Java#321
robin-aws merged 17 commits into
main-1.xfrom
robin-aws/reference-type-descriptors-fix

Conversation

@robin-aws

@robin-aws robin-aws commented Feb 26, 2024

Copy link
Copy Markdown
Contributor

Description of changes:

This is necessary for Dafny 4.3 and higher, as Dafny no longer adds this method on reference types. The explicit construction of the right kind of TypeDescriptor (which works both before and after 4.3) was already implemented for other shapes in typeDescriptor(ShapeId), so I just tweaked the case identification, and scoped the default case more explicitly to shapes we know it works for, and now raise an exception for unrecognized shape types.

Unfortunately not covered by any TestModels (which is why #301 didn't fix this as well), but tested on MPL: aws/aws-cryptographic-material-providers-library#195

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@robin-aws robin-aws merged commit 91b0908 into main-1.x Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants