jet / jet/falanx

It failed to build when there's a "bytes" field in the "oneof"

Open
#171 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
F#
Stars
144
Forks
24
PR merge metrics
No merged PRs in 30d

Description

```proto
message Frame {
oneof type {
bytes buf = 1;
}
}
```
Reports:
```
Failed to serialize property Buf : System.Byte. error : System.ArgumentException: Type mismatch when building 'f': function argument type doesn't match. Expected 'System.Byte', but received type 'System.ArraySegment`1[System.Byte]'. (Parameter 'receivedType') [/home/xy02/f#/ritp/ritp.fsproj]
at Microsoft.FSharp.Quotations.PatternsModule.checkTypesSR[a](Type expectedType, Type receivedType, a name, String threeHoleSR)
at Microsoft.FSharp.Quotations.PatternsModule.checkAppliedLambda(FSharpExpr f, FSharpExpr v)
at Microsoft.FSharp.Quotations.PatternsModule.mkApplication(FSharpExpr v_0, FSharpExpr v_1)
at Microsoft.FSharp.Quotations.FSharpExpr.Application(FSharpExpr functionExpr, FSharpExpr argument)
at Microsoft.FSharp.Collections.SeqModule.Fold[T,TState](FSharpFunc`2 folder, TState state, IEnumerable`1 source)
at Falanx.Proto.Codec.Binary.Serialization.serializeProperty(FSharpExpr buffer, FSharpExpr this, PropertyDescriptor prop) in D:\a\1\s\src\Falanx.Proto.Core\BinaryCodec\Serialization.fs:line 117
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.