# New Ticket Created by  Lucas Buchala 
# Please include the string:  [perl #130286]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=130286 >


Type capture in subroutine strangely works in some contexts but not others.

  > sub f(::T) { say T }; f(10)
  (Int)

  > sub f(::T) { say (T,) }; f(10)
  No such method 'gist' for invocant of type 'T'
    in sub f at - line 1
    in block <unit> at - line 1

  > sub f(::T) { say (T.gist,) }; f(10)
  ((Int))

  > sub f(::T) { say [T] }; f(10)
  [(Int)]

  > sub f(::T) { say [T,] }; f(10)
  No such method 'gist' for invocant of type 'T'
    in sub f at - line 1
    in block <unit> at - line 1

It looks like it may has something to do with the handling of the
comma operator. A superficial investigation shows that, "recently",
only the release 2015.09 worked correctly, others before and after
don't.  I couldn't find the commit before 2015.09 that made things
starting work.  After 2015.09, bisectable6 pointed to this commit
which introduced the error:
https://github.com/rakudo/rakudo/commit/03f84eea11dc4b0c49d78844d2a8fac0981152a2

(Not sure if this is already reported; this may be a duplicate)

Reply via email to