import java.lang.Integer;
import java.lang.String;

public record R(String n) {}

public class SwitchOverload {

    f() { return 10; }
    g() { return 20; }

    public m(r) {
        return switch(r) {
            case R("test") -> f();
            case R("foo") -> g();
            case R r -> 0;
        };
    }
}