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

[Feature Request] [stdlib] Make Tuple conform to CollectionElement trait again or fix Optional to take in Movable #2708

Open
1 task done
martinvuyk opened this issue May 17, 2024 · 0 comments
Labels
enhancement New feature or request mojo-repo Tag all issues with this label

Comments

@martinvuyk
Copy link

martinvuyk commented May 17, 2024

Review Mojo's priorities

What is your request?

Implement its __copyinit__ or make Optional accept __moveinit__ as well

What is your motivation for this change?

fn strptime[
    format_str: StringLiteral
](s: String) -> Optional[
    (
        UInt16,
        UInt8,
        UInt8,
        UInt8,
        UInt8,
        UInt8,
        UInt16,
        UInt16,
        UInt16,
    )
]:
    ...

Error:
'Optional' parameter #0 has 'CollectionElement' type, but value has type 'AnyStruct[Tuple[SIMD[uint16, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint8, 1], SIMD[uint16, 1], SIMD[uint16, 1], SIMD[uint16, 1]]]'

Any other details?

@ConnorGray this commit changed it

@martinvuyk martinvuyk added enhancement New feature or request mojo-repo Tag all issues with this label labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

1 participant