Menu

#64 VB arrange fails on code with From and With keywords / initializers

v1.0 (example)
open
nobody
5
2014-08-18
2013-12-12
Synthos
No

The VB arrange sub-project does not handle the With and From keywords. It throws a parsing exception upon reaching the '.varname'.

The language functionality for From/With was added in .NET 9.0

Example code:

Public Shared descriptor as DescriptorProto =   New DescriptorProto() With {
        .name = "FileDescriptorSet", '<- fails here'
        .field =    New List(of FieldDescriptorProto)() From {
            New FieldDescriptorProto() With {
                .name = "file",
                .number = 1,
                .label = FieldDescriptorProto.Nested.Label.LABEL_REPEATED,
                .type = FieldDescriptorProto.Nested.Type.TYPE_MESSAGE,
                .type_name = ".google.protobuf.FileDescriptorProto",
                .fieldInfo = GetType(FileDescriptorSet).GetField("file")}},
        .extension =    New List(of FieldDescriptorProto)() From {
        },
        .nested_type = New List(of DescriptorProto)(0),
        .enum_type = New List(of EnumDescriptorProto)(0),
        .extension_range =  New List(of DescriptorProto.Nested.ExtensionRange)() From {
        },
        .constructor = New DescriptorProto.ConstructorDelegate(Function() New FileDescriptorSet())}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB