fix(KT-38262): add ability to create classes with methods that have reserved keyword as an identifier.

This commit is contained in:
Artem Kobzar
2022-04-14 16:39:24 +02:00
committed by teamcity
parent 9d0c7a55b1
commit 315ff0beeb
5 changed files with 19 additions and 1 deletions
@@ -588,7 +588,7 @@ class ExportModelGenerator(
val name = function.getExportedIdentifier()
// TODO: Use [] syntax instead of prohibiting
if (name in allReservedWords)
if (parentClass == null && name in allReservedWords)
return Exportability.Prohibited("Name is a reserved word")
return Exportability.Allowed