Skip to content

Commit ab0f3a5

Browse files
committed
Add other test case for dlang/dmd#21018
1 parent 9f29155 commit ab0f3a5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/codegen/gh4986.d

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,16 @@ const(char)[] test(ref Test t)
1111
{
1212
return t;
1313
}
14+
15+
struct Result(Type) {
16+
Type get() { assert(0); }
17+
18+
alias get this;
19+
20+
this(ref Result) {}
21+
}
22+
23+
float dotProduct() {
24+
Result!float got;
25+
return got;
26+
}

0 commit comments

Comments
 (0)