Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust is failing when we have @required Timestamp #699

Open
ShubhamChaturvedi7 opened this issue Nov 7, 2024 · 0 comments
Open

Rust is failing when we have @required Timestamp #699

ShubhamChaturvedi7 opened this issue Nov 7, 2024 · 0 comments
Labels

Comments

@ShubhamChaturvedi7
Copy link
Contributor

Model:

// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
namespace simple.types.timestamp

@aws.polymorph#localService(
  sdkId: "SimpleTimestamp",
  config: SimpleTimestampConfig,
)
service SimpleTypesTimestamp {
  version: "2021-11-01",
  resources: [],
  operations: [ GetTimestamp,  GetTimestampRequired],
  errors: [],
}

structure SimpleTimestampConfig {}

operation GetTimestamp {
  input: GetTimestampInput,
  output: GetTimestampOutput,
}

structure GetTimestampInput {
  value: Timestamp
}

structure GetTimestampOutput {
  value: Timestamp
}

operation GetTimestampRequired {
  input: GetTimestampRequiredInput,
  output: GetTimestampRequiredOutput,
}

structure GetTimestampRequiredInput {
  @required
  value: Timestamp
}

structure GetTimestampRequiredOutput {
  @required
  value: Timestamp
}

Output:

error[E0308]: mismatched types
  --> src/conversions/get_timestamp_required/_get_timestamp_required_input.rs:11:16
   |
11 |         value: crate::standard_library_conversions::otimestamp_to_dafny(&value.value),
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Sequence<DafnyCharUTF16>`, found `Rc<Option<Sequence<DafnyCharUTF16>>>`
@robin-aws robin-aws added the Rust label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants