K2 scripting: fix containing decl for last script expression
Generally the wrapping anonymous initializer can be used as a "containing declaration" for some elements, but since the initialiser for the last script expression could be dropped (the expression could be converted to the result property), this may lead to the surprises, e.g. as described in KT-65984 This fix marks the last initialiser as local, preventing it from being referenced as "containing declaration". #KT-65984
This commit is contained in:
committed by
Space Team
parent
0c5b700523
commit
9ea775cbed
@@ -0,0 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
java.io.File(".").list() as? Array<String>
|
||||
Reference in New Issue
Block a user