Errors are raised whenever I try to dump an object with one or more floats. Here is a minimal example:
type Foo = object
a: float
Dumper().dump(Foo(a: 255), stream)
This raises the following errors:
[...]/src/my_file.nim(63, 11) template/generic instantiation of `dump` from here
[...]/yaml/dumping.nim(128, 25) template/generic instantiation of `represent` from here
here
[...]/yaml/native.nim(1795, 10) template/generic instantiation of `representChild` from here
here
[...]/yaml/native.nim(1758, 8) template/generic instantiation of `representObject` from here
here
[...]/yaml/native.nim(1344, 21) template/generic instantiation of `genRepresentObject` from here
here
[...]/yaml/native.nim(1322, 24) template/generic instantiation of `:tmp` from here
here
[...]/yaml/native.nim(1316, 14) template/generic instantiation of `representChild` from here
here
[...]/yaml/native.nim(1758, 8) template/generic instantiation of `representObject` from here
here
[...]/yaml/native.nim(454, 30) Error: type mismatch
Expression: scalarEvent(".inf", tag, scalarStyleFor(ctx, T))
[1] ".inf": string
[2] tag: Tag
[3] scalarStyleFor(ctx, T): ScalarStyle
Expected one of (first mismatch at [position]):
[2] proc scalarEvent(content: string; props: Properties; style: ScalarStyle = ssAny;
startPos: Mark = Mark(); endPos: Mark = Mark()): Event
[3] proc scalarEvent(content: string = ""; tag: Tag = yTagQuestionMark;
anchor: Anchor = yAnchorNone; style: ScalarStyle = ssAny;
startPos: Mark = Mark(); endPos: Mark = Mark()): Event
nimble.nim(229) buildFromDir
This does not happen if a change the type of Foo.a to something else (e.g. int or string).
Errors are raised whenever I try to dump an object with one or more floats. Here is a minimal example:
This raises the following errors:
This does not happen if a change the type of Foo.a to something else (e.g. int or string).