www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17130] New: [Reg 2.074] ambiguous implicit super call when

https://issues.dlang.org/show_bug.cgi?id=17130

          Issue ID: 17130
           Summary: [Reg 2.074] ambiguous implicit super call when
                    inheriting core.sync.mutex.Mutex
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
import core.sync.mutex : Mutex;

class MyMutex : Mutex
{
}
CODE

dmd -c -o- bug

----
/home/dawg/Code/D/bug.d(3): Error: core.sync.mutex.Mutex.__ctor called with
argument types () matches both:
/home/dawg/dlang/dmd-master-2017-01-28/linux/bin64/../../src/druntime/import/core/sync/mutex.di(21):
    core.sync.mutex.Mutex.this()
and:
/home/dawg/dlang/dmd-master-2017-01-28/linux/bin64/../../src/druntime/import/core/sync/mutex.di(25):
    core.sync.mutex.Mutex.this()
/home/dawg/Code/D/bug.d(3): Error: class bug.MyMutex cannot implicitly generate
a default ctor when base class core.sync.mutex.Mutex is missing a default ctor
----

Introduced by https://github.com/dlang/druntime/issues/1728 or
https://github.com/dlang/druntime/issues/1726.

This is arguable a dmd bug, but it easily breaks any Mutex sub-class right now.

--
Jan 30 2017