Add stringification for nodes. (#2704)

This is used to make error messages more readable. It'll be particularly important as more complex types are added.
This commit is contained in:
Jon Ross-Perkins
2023-03-22 14:55:53 -07:00
committed by GitHub
parent e0c90767be
commit c615d76196
12 changed files with 95 additions and 27 deletions
@@ -58,6 +58,6 @@ fn Run(a: i32) {}
fn Main() {
// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE+2]]:6: No matching callable was found.
// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE-4]]:1: Type mismatch: cannot convert argument 0 from nodeFloatingPointType to nodeIntegerType.
// CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/call/fail_param_type.carbon:[[@LINE-4]]:1: Type mismatch: cannot convert argument 0 from f64 to i32.
Run(1.0);
}