msoucy / dproto

D Protocol Buffer mixins to create structures at compile time
Boost Software License 1.0
37 stars 16 forks source link

False positive DProtoReservedWordException -- Reseved word: bool #86

Closed bloche closed 8 years ago

bloche commented 8 years ago
.../phobos/std/exception.d(558,25): Error: uncaught CTFE exception object.Throwable("Reserved word: bool")
.../phobos/std/exception.d(558,17):        thrown from here
.../dproto/import/dproto/dproto.d(38,24):        called from here: ParseProtoSchema("<none>", "\x0a    message ReservedWord {\x0a        required bool working;\x0a    }\x0a")
.../dproto/import/dproto/dproto.d(38,40): Error: argument to mixin must be a string, not (ParseProtoSchema("<none>", "\x0a    message ReservedWord {\x0a        required bool working;\x0a    }\x0a").toD()) of type string
src/dosmpbf/proto.d(11,1): Error: mixin dosmpbf.proto.ProtocolBufferFromString!"\x0a    message ReservedWord {\x0a        required bool working;\x0a    }\x0a" error instantiating
dmd failed with exit code 1.

Sample code:

import dproto.dproto;

mixin ProtocolBufferFromString!q{
    message ReservedWordTest {
        required bool notReservedWord;
    }
};

The DProtoReservedWordException exception is being thrown for the type bool.