<commit_before>meme central:memescript/compiler
requires test

// -- module functions --

main: fun() {
  var res = 0;
  var e = X.new();
  e.x(fun(m) {
    if (true) {
      e.y(fun(n) {
        res = m + n;
      });
    }
  });
  test.assertEqual(res, 3, "if inside nested closures triggered by methods");
}

// -- module classes --

class X
fields: ;
init new: fun() {
}

instance_method x: fun(fn) {
      fn(2);
    }

instance_method y: fun(fn) {
      fn(1);
    }

end //closures11:X
<commit_msg>fix indent in test_closures11<commit_after>meme central:memescript/compiler
requires test

// -- module functions --

main: fun() {
  var res = 0;
  var e = X.new();
  e.x(fun(m) {
    if (true) {
      e.y(fun(n) {
        res = m + n;
      });
    }
  });
  test.assertEqual(res, 3, "if inside nested closures triggered by methods");
}

// -- module classes --

class X
init new: fun() {
}
instance_method x: fun(fn) {
  fn(2);
}

instance_method y: fun(fn) {
  fn(1);
}

end //closures11:X

{'fraction_non_alphanumeric': 0.17017017017017017, 'fraction_numerical': 0.014014014014014014, 'mean_word_length': 2.3444816053511706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6179081', 'n_tokens_mistral': 398, 'n_tokens_neox': 386, 'n_words': 98}