JVM IR: do not hide constructor with inline class in anonymous object
#KT-45131 Fixed
This commit is contained in:
+4
-1
@@ -90,7 +90,10 @@ class AnonymousObjectTransformer(
|
||||
val node = MethodNode(access, name, desc, signature, exceptions)
|
||||
if (name == "<init>") {
|
||||
if (constructor != null) {
|
||||
throw RuntimeException("Lambda, SAM or anonymous object should have only one constructor")
|
||||
throw RuntimeException(
|
||||
"Lambda, SAM or anonymous object should have only one constructor.\n" +
|
||||
"First:\n${constructor.nodeText}\n\nSecond:\n${node.nodeText}\n"
|
||||
)
|
||||
}
|
||||
constructor = node
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user