Skip to content

Commit a6931b9

Browse files
committed
Exclude @__future class methods from name hiding checks
Analogous to DMD.
1 parent a96bf9b commit a6931b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ir/irclass.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ LLConstant *IrAggr::getVtblInit() {
194194
assert(isIrFuncCreated(fd) && "invalid vtbl function");
195195
c = DtoBitCast(DtoCallee(fd), voidPtrType);
196196

197-
if (cd->isFuncHidden(fd)) {
197+
if (cd->isFuncHidden(fd) && !fd->isFuture()) {
198198
// fd is hidden from the view of this class. If fd overlaps with any
199199
// function in the vtbl[], issue error.
200200
for (size_t j = cd->vtblOffset(); j < n; j++) {
@@ -205,6 +205,9 @@ LLConstant *IrAggr::getVtblInit() {
205205
if (!fd2->ident->equals(fd->ident)) {
206206
continue;
207207
}
208+
if (fd2->isFuture()) {
209+
continue;
210+
}
208211
if (fd->leastAsSpecialized(fd2) || fd2->leastAsSpecialized(fd)) {
209212
TypeFunction *tf = static_cast<TypeFunction *>(fd->type);
210213
if (tf->ty == Tfunction) {

0 commit comments

Comments
 (0)