Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xy02 opened this issue Oct 18, 2020 · 1 comment
Open

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

xy02 opened this issue Oct 18, 2020 · 1 comment

Comments

@xy02
Copy link

xy02 commented Oct 18, 2020

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
@gusty
Copy link
Contributor

gusty commented Oct 18, 2020

We should clone this repo in order to give proper support as Jet is not maintaining it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants