---
source: compiler-core/src/parse/tests.rs
expression: "let assert [x]: List(Int) = [2]"
---
[
    Assignment(
        Assignment {
            location: SrcSpan {
                start: 0,
                end: 31,
            },
            value: List {
                location: SrcSpan {
                    start: 28,
                    end: 31,
                },
                elements: [
                    Int {
                        location: SrcSpan {
                            start: 29,
                            end: 30,
                        },
                        value: "2",
                        int_value: 2,
                    },
                ],
                tail: None,
            },
            pattern: List {
                location: SrcSpan {
                    start: 11,
                    end: 14,
                },
                elements: [
                    Variable {
                        location: SrcSpan {
                            start: 12,
                            end: 13,
                        },
                        name: "x",
                        type_: (),
                        origin: VariableOrigin {
                            syntax: Variable(
                                "x",
                            ),
                            declaration: LetPattern,
                        },
                    },
                ],
                tail: None,
                type_: (),
            },
            kind: Assert {
                location: SrcSpan {
                    start: 0,
                    end: 10,
                },
                assert_keyword_start: 4,
                message: None,
            },
            compiled_case: CompiledCase {
                tree: Fail,
                subject_variables: [],
            },
            annotation: Some(
                Constructor(
                    TypeAstConstructor {
                        location: SrcSpan {
                            start: 16,
                            end: 25,
                        },
                        name: Unqualified {
                            name: "List",
                            location: SrcSpan {
                                start: 16,
                                end: 20,
                            },
                        },
                        arguments: [
                            Constructor(
                                TypeAstConstructor {
                                    location: SrcSpan {
                                        start: 21,
                                        end: 24,
                                    },
                                    name: Unqualified {
                                        name: "Int",
                                        location: SrcSpan {
                                            start: 21,
                                            end: 24,
                                        },
                                    },
                                    arguments: [],
                                    start_parentheses: None,
                                },
                            ),
                        ],
                        start_parentheses: Some(
                            20,
                        ),
                    },
                ),
            ),
        },
    ),
]
