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

cling misidentifies called lambda

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: 6.22/00
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      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

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

              Dates

              Created:
              Updated:
              Resolved: