diff options
author | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-14 16:07:46 +0300 |
---|---|---|
committer | Joel Kronqvist <joel.kronqvist@iki.fi> | 2025-08-14 17:28:04 +0300 |
commit | e85dae567589181959683f78a783b6a81fb3d01f (patch) | |
tree | 9c5831c4429b2458936cbb9122f4a954543672f0 /src/type/display.rs | |
parent | 540a84fb9288699b534e98c8c5d0e649aaa1c2ba (diff) | |
download | myslip-e85dae567589181959683f78a783b6a81fb3d01f.tar.gz myslip-e85dae567589181959683f78a783b6a81fb3d01f.zip |
test: stricter generic checking tests added for Type::aka and Type::into_type
Diffstat (limited to 'src/type/display.rs')
-rw-r--r-- | src/type/display.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/type/display.rs b/src/type/display.rs index b562d7b..a2f4b58 100644 --- a/src/type/display.rs +++ b/src/type/display.rs @@ -78,10 +78,6 @@ impl fmt::Display for TypeError { /// "invalid argument list: '(1 2 3)'\nexpected: '(Int Int)'\nfound: '(Int Int Int)'".to_string() /// ); /// assert_eq!( - /// UnboundGeneric(String::from("?")).to_string(), - /// "unbound generic type: '?'".to_string() - /// ); - /// assert_eq!( /// ArgumentsDontMatchGeneric { /// argtype: Integer, /// generictype: arr(VarType("T".to_string()), Integer) @@ -92,7 +88,7 @@ impl fmt::Display for TypeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { UndefinedVariable(name) => write!(f, "undefined variable: '{}'", name), - UnboundGeneric(name) => write!(f, "unbound generic type: '{}'", name), + UnboundGeneric(name, ty) => write!(f, "unbound generic type '{name}' in '{ty}'"), InvalidOperator { operator, expected, found } => { write!( f, |