E0160

A string pattern with an interpolation hole. A pattern is a plain literal.

Machine-applicable fix: none.

Example

This program fails with E0160.

fn greet(name: String) -> Int {
    match name {
        "hi {name}" => 1
        _ => 0
    }
}

Fixed

The same program, fixed.

fn greet(name: String) -> Int {
    match name {
        "hi" => 1
        _ => 0
    }
}

Listed in the checker notes. oskac explain E0160 prints this entry offline.

All error codes