eab5164993
The problem was that in K2 for some top-level script declarations we need to add a dispatch receiver parameter (because frontend do not assign any, but representing script as a class requires it to be the script class) and at the same time, calls to these declarations rely on properly set dispatch receiver parameter. The simplest solution found is to have an additional traversal on the relevan top-level declarations and assigning the dispatch receiver, before running the main transformation. #KT-64502 fixed
31 lines
721 B
Plaintext
Vendored
31 lines
721 B
Plaintext
Vendored
MODULE main
|
|
CLASS AnonymousObjectCapturesProperty.class
|
|
CLASS METADATA
|
|
K1
|
|
<init>([Ljava/lang/String;)V
|
|
K2
|
|
---
|
|
Property: class.metadata.superTypes
|
|
K1
|
|
[kotlin/script/templates/standard/ScriptTemplateWithArgs]
|
|
K2
|
|
[]
|
|
Property: class.metadata.contextReceiverTypes
|
|
K1
|
|
[]
|
|
K2
|
|
[kotlin/script/templates/standard/ScriptTemplateWithArgs]
|
|
PROPERTY getB()LAnonymousObjectCapturesProperty$A;
|
|
Property: class.metadata.property.returnType
|
|
K1
|
|
AnonymousObjectCapturesProperty.A
|
|
K2
|
|
A
|
|
CLASS AnonymousObjectCapturesProperty$B$1.class
|
|
CLASS METADATA
|
|
Property: class.metadata.superTypes
|
|
K1
|
|
[AnonymousObjectCapturesProperty.A]
|
|
K2
|
|
[A]
|