struct Diagnostic { msg: String, level: String } def new(msg: String, level: String) -> Diagnostic { Diagnostic(msg: msg, level: level) } def main() { let msg = "variable is unused" let diag = new(msg, "warning") debug(diag.msg) debug(diag.level) }