Skip to content

Wrong mode for main() argument causes LLVM assertion failure #3528

Closed
@catamorphism

Description

@catamorphism
fn main(+_args: ~[~str]) {}

results in:

Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"), function init, file /Users/tchevalier/rust/src/llvm/lib/VMCore/Instructions.cpp, line 280.

I know modes are going away, but in general it's probably worth testing that doing various weird things to main's signature yields a proper error.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions