Skip to content

Non-constant repeat count expr causes ICE #4063

Closed
@therealgymmy

Description

@therealgymmy

Current (minimized) example of breakage:

(courtesy of youknowone; see comments below)

fn main() { let _a = [0, ..1 as uint]; }

Original Report:

The following code causes the crash

enum State { ST_NULL, ST_WHITESPACE }

priv fn SomeFunction () -> StateTable {
    StateTable { entry: ~[mut ~[mut ST_NULL, ..ST_WHITESPACE], ..128] }
}

The error messages are as follows:

error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug

It seems that the compiler does not understand entry: ~[mut ~[mut ST_NULL, ..ST_WHITESPACE], ..128].

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions