OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 17 matching lines...) Expand all Loading... |
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 |
31 syntax = "proto2"; | 31 syntax = "proto2"; |
32 | 32 |
33 option java_package = "com.google.apps.jspb.proto"; | 33 option java_package = "com.google.apps.jspb.proto"; |
34 option java_multiple_files = true; | 34 option java_multiple_files = true; |
35 | 35 |
36 package jspb.test; | 36 package jspb.test; |
37 | 37 |
| 38 import "test.proto"; |
| 39 |
38 message TestExtensionsMessage { | 40 message TestExtensionsMessage { |
39 optional int32 intfield = 1; | 41 optional int32 intfield = 1; |
40 extensions 100 to max; | 42 extensions 100 to max; |
41 } | 43 } |
42 | 44 |
43 message ExtensionMessage { | 45 message ExtensionMessage { |
44 extend TestExtensionsMessage { | 46 extend TestExtensionsMessage { |
45 optional ExtensionMessage ext_field = 100; | 47 optional ExtensionMessage ext_field = 100; |
46 } | 48 } |
47 optional string ext1 = 1; | 49 optional string ext1 = 1; |
48 } | 50 } |
49 | 51 |
50 // Floating extensions are only supported when generating a _lib.js library. | 52 // Floating extensions are only supported when generating a _lib.js library. |
51 extend TestExtensionsMessage { | 53 extend TestExtensionsMessage { |
52 optional ExtensionMessage floating_msg_field = 101; | 54 optional ExtensionMessage floating_msg_field = 101; |
53 optional string floating_str_field = 102; | 55 optional string floating_str_field = 102; |
54 } | 56 } |
| 57 |
| 58 message ForeignNestedFieldMessage { |
| 59 optional Deeply.Nested.Message deeply_nested_message = 1; |
| 60 } |
OLD | NEW |