generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
soundnessBugs that cause the generated code to compute the wrong value or crashBugs that cause the generated code to compute the wrong value or crash
Description
If I have a structure like this:
operation GetIntegerOutputPosition {
input: GetIntegerOutputPositionInput
output: GetIntegerOutputPositionOutput,
}
structure GetIntegerOutputPositionInput {
value: Integer
}
@positional
structure GetIntegerOutputPositionOutput {
value: Integer
}
From this model, the Dafny code will be polymorph'ed as
method GetIntegerOutputPosition ( input: GetIntegerOutputPositionInput )
returns (output: Result<int32, Error>)
Which is wrong because based on the model the return type should be Option.
To resolve this issue, there are two solutions:
- The polymorph should fail with a validation error.
- This should be generated as Option but not int32
Metadata
Metadata
Assignees
Labels
soundnessBugs that cause the generated code to compute the wrong value or crashBugs that cause the generated code to compute the wrong value or crash