Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.12.0-M1
    • Component/s: Type Checker
    • Labels:

      Description

      From Typers:

      /** Try packing all arguments into a Tuple and apply `fun'
                 *  to that. This is the last thing which is tried (after
                 *  default arguments)
                 */
      

      I couldn't find this in the spec.

        Issue Links

          Activity

          Hide
          Jason Zaugg added a comment -

          While we're at it, we could make this safer by:

          • warning if auto tupling chooses one of overloaded alternatives
          • warning if any auto-tupling occurs if -Xwarn-auto-tupling is specified.
          [11:13pm] paulp: So I change from one joda time class with a 7-arg constructor to a similar one with fewer.
          [11:13pm] paulp: but in addition to not having a 7-arg constructor, it has one which takes Object.
          [11:14pm] paulp: so no warning until runtime failure "what the <expletive deleted> is a 7-tuple?" says joda time.
          [11:14pm] paulp: that is an absolute debacle. 
          [11:14pm] paulp: I knew about this issue but it never bit me this ugly before.
          [11:16pm] retronym: -Xwarn-auto-tupling would be popular, from my straw polls
          [11:19pm] retronym: paulp: or just outright disable it if there are overloaded alternatives
          
          Show
          Jason Zaugg added a comment - While we're at it, we could make this safer by: warning if auto tupling chooses one of overloaded alternatives warning if any auto-tupling occurs if -Xwarn-auto-tupling is specified. [11:13pm] paulp: So I change from one joda time class with a 7-arg constructor to a similar one with fewer. [11:13pm] paulp: but in addition to not having a 7-arg constructor, it has one which takes Object. [11:14pm] paulp: so no warning until runtime failure "what the <expletive deleted> is a 7-tuple?" says joda time. [11:14pm] paulp: that is an absolute debacle. [11:14pm] paulp: I knew about this issue but it never bit me this ugly before. [11:16pm] retronym: -Xwarn-auto-tupling would be popular, from my straw polls [11:19pm] retronym: paulp: or just outright disable it if there are overloaded alternatives
          Hide
          Jason Zaugg added a comment -

          A warning could also be emitted if the target method is defined in Java.

          Show
          Jason Zaugg added a comment - A warning could also be emitted if the target method is defined in Java.
          Show
          Jason Zaugg added a comment - See: http://thread.gmane.org/gmane.comp.lang.scala.debate/4954
          Hide
          Paul Phillips added a comment -

          There has been a warning available since https://github.com/scala/scala/commit/4e488a60594 and the warning is included in -Xlint.

          Show
          Paul Phillips added a comment - There has been a warning available since https://github.com/scala/scala/commit/4e488a60594 and the warning is included in -Xlint.
          Hide
          Grzegorz Kossakowski added a comment -

          Unassigning and rescheduling to M7 as previous deadline was missed.

          Show
          Grzegorz Kossakowski added a comment - Unassigning and rescheduling to M7 as previous deadline was missed.
          Hide
          Adriaan Moors added a comment -

          Not classifying as a spec bug, because I believe we should instead deprecate this. See also the discussion over at Dotty, where I hope this won't be implemented at all: https://github.com/lampepfl/dotty/pull/51

          Show
          Adriaan Moors added a comment - Not classifying as a spec bug, because I believe we should instead deprecate this. See also the discussion over at Dotty, where I hope this won't be implemented at all: https://github.com/lampepfl/dotty/pull/51

            People

            • Assignee:
              Adriaan Moors
              Reporter:
              Jason Zaugg
              TracCC:
              Eric Torreborre, Erik Engbrecht, Ismael Juma, Johannes Rudolph, Paul Phillips, Seth Tisue
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:

                Development