Skip to content

Internal compiler error on invalid field name in struct literal #3990

Closed
@ben0x539

Description

@ben0x539

This prints an ICE in addition to the expected diagnostic:

struct S {
    x: int
}

fn main() {
    S { y: 1 };
}

error: internal compiler error: no type for node 8: expr 1 (id=8) in fcx 7f8a6449c480

I half-remember hearing that this is already known a while ago, but I couldn't find an issue for it and it's still happening. Sorry if this is redundant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemI-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