Add regression test for #10475 (#3468)

This commit is contained in:
chrchr-github 2021-09-27 19:57:41 +02:00 committed by GitHub
parent ca26f2bdda
commit d87c599f1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -46,6 +46,7 @@ private:
TEST_CASE(template3); TEST_CASE(template3);
TEST_CASE(template4); // #9805 TEST_CASE(template4); // #9805
TEST_CASE(template5); TEST_CASE(template5);
TEST_CASE(template6); // #10475 crash
TEST_CASE(throwIsNotAFunction); TEST_CASE(throwIsNotAFunction);
TEST_CASE(unusedError); TEST_CASE(unusedError);
TEST_CASE(unusedMain); TEST_CASE(unusedMain);
@ -261,6 +262,12 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void template6() { // #10475
check("template<template<typename...> class Ref, typename... Args>\n"
"struct Foo<Ref<Args...>, Ref> : std::true_type {};\n");
ASSERT_EQUALS("", errout.str());
}
void throwIsNotAFunction() { void throwIsNotAFunction() {
check("struct A {void f() const throw () {}}; int main() {A a; a.f();}"); check("struct A {void f() const throw () {}}; int main() {A a; a.f();}");
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());