schveiguy / iopipe

D language library for modular io
Boost Software License 1.0
77 stars 6 forks source link

using std.stdio.File gives surprising error #45

Open schveiguy opened 8 months ago

schveiguy commented 8 months ago

If you forget and use std.stdio.File as your input stream, then you get a weird error about GCNoPointerAllocator.

../../../.dub/packages/iopipe/0.2.5/iopipe/source/iopipe/bufpipe.d(571,84): Error: initializer provided for struct `GCNoPointerAllocator` with no fields
../../../.dub/packages/iopipe/0.2.5/iopipe/source/iopipe/bufpipe.d(580,56): Error: template instance `iopipe.bufpipe.bufd!(ubyte, GCNoPointerAllocator, 32LU, immutable(NullDev), RefCounted!(File))` error instantiating
source/app.d(11,43):        instantiated from here: `bufd!(ubyte, GCNoPointerAllocator, 32LU, RefCounted!(File))`

See if this can be fixed for a better error using constraints or something else.