This repository was archived by the owner on Jun 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +53
-1
lines changed
Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change 1+ 2017-12-10 Iain Buclaw <ibuclaw@gdcproject.org>
2+
3+ * types.cc (TypeVisitor::visit(TypeClass)): Check for duplicate
4+ declarations before adding method.
5+
162017-12-09 Iain Buclaw <ibuclaw@gdcproject.org>
27
38 * expr.cc (ExprVisitor::visit(AddrExp)): Build internal struct literal
Original file line number Diff line number Diff line change @@ -941,7 +941,8 @@ class TypeVisitor : public Visitor
941941 FuncDeclaration *fd = t->sym ->vtbl [i]->isFuncDeclaration ();
942942 tree method = fd ? get_symbol_decl (fd) : NULL_TREE;
943943
944- if (method && DECL_CONTEXT (method) == basetype)
944+ if (method && DECL_CONTEXT (method) == basetype
945+ && !chain_member (method, TYPE_FIELDS (basetype)))
945946 TYPE_FIELDS (basetype) = chainon (TYPE_FIELDS (basetype), method);
946947 }
947948
Original file line number Diff line number Diff line change 1+ // Bug 282
2+
3+ class C282a
4+ {
5+ void fun ()
6+ {
7+ }
8+
9+ void f282 ()
10+ {
11+ }
12+
13+ void f282 () // { dg-error "conflicts with gdc282.C282a.f282" }
14+ {
15+ }
16+ }
17+
18+ class C282b
19+ {
20+ struct S282b
21+ {
22+ }
23+
24+ void f282 ()
25+ {
26+ }
27+
28+ void f282 () // { dg-error "conflicts with gdc282.C282b.f282" }
29+ {
30+ }
31+ }
32+
33+ class C282c
34+ {
35+ class C282c
36+ {
37+ }
38+
39+ void f282 ()
40+ {
41+ }
42+
43+ void f282 () // { dg-error "conflicts with gdc282.C282c.f282" }
44+ {
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments