JS: repair serialization of type aliases

This commit is contained in:
Alexey Andreev
2016-09-16 18:43:33 +03:00
parent 9dd6c9a65c
commit 7dbada0d06
6 changed files with 33 additions and 25 deletions
@@ -135,7 +135,7 @@ object KotlinJavascriptSerializationUtil {
val packageStream = ByteArrayOutputStream()
val fragments = packageView.fragments
val packageProto = serializer.packageProto(fragments, skip).build() ?: error("Package fragments not serialized: $fragments")
if (packageProto.functionCount > 0 || packageProto.propertyCount > 0) {
if (packageProto.functionCount > 0 || packageProto.propertyCount > 0 || packageProto.typeAliasCount > 0) {
packageProto.writeTo(packageStream)
writeFun(KotlinJavascriptSerializedResourcePaths.getPackageFilePath(fqName), packageStream.toByteArray())
}