| 1 |
// https://bugzilla.gdcproject.org/show_bug.cgi?id=282 |
| 2 |
// { dg-shouldfail "conflicting methods in class" } |
| 3 |
// { dg-do compile } |
| 4 |
|
| 5 |
class C282a |
| 6 |
{ |
| 7 |
void fun() |
| 8 |
{ |
| 9 |
} |
| 10 |
|
| 11 |
void f282() |
| 12 |
{ |
| 13 |
} |
| 14 |
|
| 15 |
void f282() // { dg-error "conflicts with previous declaration" } |
| 16 |
{ |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
class C282b |
| 21 |
{ |
| 22 |
struct S282b |
| 23 |
{ |
| 24 |
} |
| 25 |
|
| 26 |
void f282() |
| 27 |
{ |
| 28 |
} |
| 29 |
|
| 30 |
void f282() // { dg-error "conflicts with previous declaration" } |
| 31 |
{ |
| 32 |
} |
| 33 |
} |
| 34 |
|
| 35 |
class C282c |
| 36 |
{ |
| 37 |
class C282c |
| 38 |
{ |
| 39 |
} |
| 40 |
|
| 41 |
void f282() |
| 42 |
{ |
| 43 |
} |
| 44 |
|
| 45 |
void f282() // { dg-error "conflicts with previous declaration" } |
| 46 |
{ |
| 47 |
} |
| 48 |
} |