blob: 6206d0b9eb13f5a31ac7457d42b810b5bf179f7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// { dg-do assemble }
// GROUPS passed overloading
typedef void * (*NewObject) (void);
class B
{
public:
static void WantsNew (NewObject creator); // { dg-message "B::WantsNew|no known conversion" }
};
class A
{
public:
static A * NewOne (void);
static void InitClass (void)
{
B::WantsNew ( (NewObject) A::NewOne );
// This used to die in convert_harshness_{ansi,old} cuz it
// didn't know what to do about a void type.
B::WantsNew ( A::NewOne );// { dg-error "no matching" }
// { dg-message "candidate" "candidate note" { target *-*-* } 21 }
}
};
|