@@ -1,4 +1,4 @@
-081d61e157f0064dc93c757d61cd998d3cb5288f
+88de5e369b2c322e55174ae4f3bef5ad0c0c0930
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
@@ -1515,7 +1515,7 @@ Expression semanticTraits(TraitsExp e, Scope* sc)
if (tf)
{
- link = fd ? fd.linkage : tf.linkage;
+ link = fd ? fd.toAliasFunc().linkage : tf.linkage;
}
else
{
@@ -3637,12 +3637,16 @@ Expression dotExp(Type mt, Scope* sc, Expression e, Identifier ident, int flag)
}
else
{
+ Expression e0;
+ Expression ev = e;
+ ev = extractSideEffect(sc, "__tup", e0, ev);
+
const length = cast(size_t)mt.dim.toUInteger();
auto exps = new Expressions();
exps.reserve(length);
foreach (i; 0 .. length)
- exps.push(new IndexExp(e.loc, e, new IntegerExp(e.loc, i, Type.tsize_t)));
- e = new TupleExp(e.loc, exps);
+ exps.push(new IndexExp(e.loc, ev, new IntegerExp(e.loc, i, Type.tsize_t)));
+ e = new TupleExp(e.loc, e0, exps);
}
}
else
new file mode 100644
@@ -0,0 +1,9 @@
+// https://issues.dlang.org/show_bug.cgi?id=23087
+struct S
+{
+ this(bool) {}
+ this(bool, int) {}
+}
+
+static foreach (ctor; __traits(getOverloads, S, "__ctor"))
+ static assert(__traits(getLinkage, ctor) == "D");
new file mode 100644
@@ -0,0 +1,7 @@
+// https://issues.dlang.org/show_bug.cgi?id=23089
+extern(System) int i23089;
+
+extern(System):
+
+alias F23089 = void function(int);
+F23089 f23089;
new file mode 100644
@@ -0,0 +1,16 @@
+// https://issues.dlang.org/show_bug.cgi?id=23083
+int calls = 0;
+
+int[2] f()
+{
+ calls++;
+ return [123, 456];
+}
+
+void g(int a, int b) {}
+
+void main()
+{
+ g(f().tupleof);
+ assert(calls == 1);
+}