Skip to content

Patterns in extern fns either ICE or aren't type-checked #10877

Closed
@huonw

Description

@huonw

The following compiles fine, but uncommenting any of the currently-commented extern functions makes the compiler ICE.

struct Foo { x: int }
extern {
    // fn foo(1: ());
    // fn bar((): int);
    // fn baz(Foo { x }: int);
    fn qux((x,y): ());
}
fn main() {}

For foo the ICE message is

error: internal compiler error: node_id_to_type: no type for node `expr 1 (id=12)`

and the others are similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions