wiln / protoc-gen-as3

Automatically exported from code.google.com/p/protoc-gen-as3
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Repeated Nested message, 'const' error in ReadFromSlice() #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

1. Defining a nested message as follow:

message Test{
    message Nested{
        required int32 id = 1;
    }
    repeated Nested nested = 1;
}
2. Generated code as follow

public final function readFromSlice(input:flash.utils.IDataInput, 
bytesAfterSlice:uint):void {
    ...
    case 1:
           const nested$element:MessageDefinition.Test.Nested = new MessageDefinition.Test.Nested();
    ...

3. 'const' is causing compiling error

Original issue reported on code.google.com by super...@gmail.com on 9 Jun 2011 at 8:51

GoogleCodeExporter commented 9 years ago
Please compile the code by mxmlc, not Flash Professional CS3/4/5

Original comment by pop.atry@gmail.com on 18 Jun 2011 at 9:39

GoogleCodeExporter commented 9 years ago
But some project need to use generated code in Flash IDE, right?
I see problem in line 877 of compiler/com/netease/protocGenAs3/Main.java

Original comment by super...@gmail.com on 20 Jun 2011 at 3:25

GoogleCodeExporter commented 9 years ago
You are right. I just remove the 'const' in 1.0.0-rc3. Thanks for your advice.

Original comment by pop.atry@gmail.com on 23 Jun 2011 at 5:15