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
<lizmat> m: sub a( --> Str() ) { 42 }; dd a # should this work ?
<camelia> rakudo-moar 6cd6ef: OUTPUT«Type check failed for return value; expected Str(Any) but got Int (42) in block <unit> at <tmp> line 1»
<gfldex> lizmat: this should not work
<gfldex> m: sub a( --> Str(Int) ) { 42 }; dd a
<camelia> rakudo-moar 6cd6ef: OUTPUT«Type check failed for return value; expected Str(Int) but got Int (42) in block <unit> at <tmp> line 1»
<gfldex> but this should (and do the right thing)
<gfldex> m: sub a( --> Str(Int) ) { 42.Str }; dd a
<camelia> rakudo-moar 6cd6ef: OUTPUT«Type check failed for return value; expected Str(Int) but got Str ("42") in block <unit> at <tmp> line 1»
<lizmat> gfldex: but Str() is just short for Str(Any), so why shouldn't Str() work?
<gfldex> oh yes, it should work but doesn't yet. There may be a RT already.
<gfldex> lizmat: i just checked RT for "return" and could not find a matching RT for this
<lizmat> gfldex: ok, shall I RT it or will you ?
<gfldex> please RT
Migrated from rt.perl.org#128964 (status was 'resolved')
Searchable as RT128964$
The text was updated successfully, but these errors were encountered: