Change object deserialization strategy
Objects now have synthetic class objects in deserialization as well. "Class" proto message now can have a synthetic class object proto within, if it's not contained in any external class file, which is the case with objects. Drop "class_object_present" field from binary format, since its value is equivalent to the presence of "class_object" field
This commit is contained in:
@@ -210,14 +210,12 @@ public class NamespaceCodegen extends MemberCodegen {
|
||||
* @param namespaceFiles all files should have same package name
|
||||
* @return
|
||||
*/
|
||||
public static boolean shouldGenerateNSClass(Collection<JetFile> namespaceFiles) {
|
||||
public static boolean shouldGenerateNSClass(@NotNull Collection<JetFile> namespaceFiles) {
|
||||
checkAllFilesHaveSameNamespace(namespaceFiles);
|
||||
|
||||
for (JetFile file : namespaceFiles) {
|
||||
for (JetDeclaration declaration : file.getDeclarations()) {
|
||||
if (declaration instanceof JetProperty ||
|
||||
declaration instanceof JetNamedFunction ||
|
||||
declaration instanceof JetObjectDeclaration) {
|
||||
if (declaration instanceof JetProperty || declaration instanceof JetNamedFunction) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user