[Issue 17240] New: mutable/shared @property both match in typeof
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Mar 2 05:55:28 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17240
Issue ID: 17240
Summary: mutable/shared @property both match in typeof
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
struct S
{
import std.stdio;
int b() @property { return 0; }
int b() @property const { return 0; }
int b() @property shared { return 0; }
}
alias T = typeof(S.b);
/d746/f453.d(9): Error: f453.S.b called with argument types () matches both:
/d746/f453.d(4): f453.S.b()
and:
/d746/f453.d(6): f453.S.b()
The problem doesn't occur without @property, whether or not () are included in
the typeof expression.
The clash is to do with shared. const/shared clash, as do mutable/shared, but
mutable/const is fine.
In order to add typeof(AggregateType.member) support to std.typecons.Proxy
(with knockon improvements to a few other things in std.typecons), either this
bug or https://issues.dlang.org/show_bug.cgi?id=17239 needs resolving.
--
More information about the Digitalmars-d-bugs
mailing list