Skip to content

Unary negation not properly typechecked #813

Closed
@msullivan

Description

@msullivan
fn main() {
    -"foo";
}

produces

rustc: Constants.cpp:1747: static llvm::Constant* llvm::ConstantExpr::getNeg(llvm::Constant*, bool, bool): Assertion `C->getType()->isIntOrIntVectorTy() && "Cannot NEG a nonintegral value!"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions