Open
Description
@eregon found a bug in the AST inlining in SOMns. The following test does not result in the correct output:
class Test usingPlatform: platform = Value (
| private Array = platform kernel Array. |
)(
public main: args = (
| arr b |
arr := Array new: 10.
args from: 2 to: args size do: [ :arg | arg print. ' ' print ].
'Correct Semantics' println.
b := [ :i |
arr at: i put: [ i ]].
1 to: 10 do: b.
1 to: 10 do: [ :i |
(arr at: i) value println ].
'Broken Semantics' println.
1 to: 10 do: [ :i |
arr at: i put: [ i ]].
1 to: 10 do: [ :i |
(arr at: i) value println ].
^ 0
)
)
This issue is very likely to be a problem for TruffleSOM, too.