ldc/tests/codegen/variadic_thunk_gh2613.d
2018-04-10 22:01:55 +02:00

22 lines
326 B
D

// RUN: %ldc -run %s
interface Stream
{
void write(...);
}
class OutputStream : Stream
{
void write(...)
{
import core.vararg;
auto arg = va_arg!string(_argptr);
assert(arg == "Hello world");
}
}
void main()
{
Stream stream = new OutputStream;
stream.write("Hello world");
}