lang, lang: types: Add automatic stringer generation

It's more useful if we know the string representation of Kind's.
This commit is contained in:
James Shubin
2019-04-27 16:14:10 -04:00
parent 310239e707
commit 2f7e202f40
7 changed files with 39 additions and 5 deletions

View File

@@ -697,7 +697,7 @@ func TestUnification1(t *testing.T) {
name: "typed if expr",
ast: stmt,
fail: true,
experrstr: "can't unify, invariant illogicality with equality: base kind does not match (2 != 3)",
experrstr: "can't unify, invariant illogicality with equality: base kind does not match (Str != Int)",
})
}
{
@@ -750,7 +750,7 @@ func TestUnification1(t *testing.T) {
name: "typed var expr",
ast: stmt,
fail: true,
experrstr: "can't unify, invariant illogicality with equality: base kind does not match (2 != 1)",
experrstr: "can't unify, invariant illogicality with equality: base kind does not match (Str != Bool)",
})
}