remove uses of classinfo, rebases part of #7445 (#9062)

This commit is contained in:
Nicholas Wilson 2024-10-21 14:50:11 +08:00 committed by GitHub
parent ab46287e18
commit fb602efdc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1801,7 +1801,7 @@ expression.
@system unittest
{
import std.format : format;
assert("%s".format.ifThrown!Exception(e => e.classinfo.name) == "std.format.FormatException");
assert("%s".format.ifThrown!Exception(e => typeid(e).name) == "std.format.FormatException");
}
//Verify Examples
@ -1834,7 +1834,7 @@ expression.
static assert(!__traits(compiles, (new Object()).ifThrown(1)));
//Use a lambda to get the thrown object.
assert("%s".format().ifThrown(e => e.classinfo.name) == "std.format.FormatException");
assert("%s".format().ifThrown(e => typeid(e).name) == "std.format.FormatException");
}
@system unittest