summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/rtti1.d
blob: ed5f3440689e14729a9420b15be275c033c824c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
// { dg-options "-fno-rtti" }
// { dg-shouldfail "expressions depend on TypeInfo" }

int* testInExp(int key, int[int] aa)
{
    return key in aa; // { dg-error "requires .object.TypeInfo. and cannot be used with .-fno-rtti." }
}

bool testAAEqual(int[string] aa1, int[string] aa2)
{
    return aa1 == aa2; // { dg-error "requires .object.TypeInfo. and cannot be used with .-fno-rtti." }
}

string testConcat(string a, string b)
{
    return a ~ b; // { dg-error "requires .object.TypeInfo. and cannot be used with .-fno-rtti." }
}