ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

JsonPackage is not setting refinedDeclaration for members of top-level objects #676

Closed jvasileff closed 8 years ago

jvasileff commented 8 years ago

In loadDeclarations(), refineMembers() is called for each declaration in order to set Declaration.refinedDeclaration on all members, but this is not happening for top-level values like true.

I don't know how correct this is, but adding the following seems to work:

                } else if (m.get(MetamodelGenerator.KEY_METATYPE) instanceof Value) {
                    TypeDeclaration td = ((Value)m.get(MetamodelGenerator.KEY_METATYPE)).getTypeDeclaration();
                    if (td != null) {
                        refineMembers((ClassOrInterface)td);
                    }
                }

as the last else if at https://github.com/ceylon/ceylon-js/blob/master/src/main/java/com/redhat/ceylon/compiler/js/loader/JsonPackage.java#L146

jvasileff commented 8 years ago

moved to correct repo - https://github.com/ceylon/ceylon/issues/5798