You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: rakudo/rakudo@03f84ee
(Not sure if this is already reported; this may be a duplicate)
Migrated from rt.perl.org#130286 (status was 'new')
Searchable as RT130286$
The text was updated successfully, but these errors were encountered: