Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10689

cling misidentifies called lambda

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.22/00
    • master
    • Cling
    • None
    • Linux, at least

    Description

      .rawInput
      template <class F> void call(F &f) { f(); }
      auto l1 = []() -> int { printf("ONE\n"); return 42; }; auto l2 = []() -> long { printf("TWO\n"); return 17; };
      .rawInput
      call(l1); call(l2);
      call(l2);
      

      yields

      ONE
      TWO
      ONE
      

      instead of the expected

      ONE
      TWO
      TWO
      

      Attachments

        Activity

          People

            axel Axel Naumann
            axel Axel Naumann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: