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


my Str:D $a = Nil; say $a; # (Str:D)
say $a.VAR.default; #(Str:D)

:D variables in general cannot have a default default. Therefore if the
default default should be to throw an exception when it is acessed. My
answer would be:

Search Discussions

  • Lloyd Fournier at May 28, 2016 at 12:01 pm
    (continued :P)
    Type check failed in assignment to $a; expected Str:D but got Mu (Mu)
       in block <unit> at -e line 1

    It can also happen on assignment to array and hash elements.
    On Sat, May 28, 2016 at 9:59 PM Lloyd Fournier wrote:

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


    my Str:D $a = Nil; say $a; # (Str:D)
    say $a.VAR.default; #(Str:D)

    :D variables in general cannot have a default default. Therefore if the
    default default should be to throw an exception when it is acessed. My
    answer would be:
  • Lloyd Fournier at May 28, 2016 at 12:02 pm
    Should be:

    Type check failed in assignment to $a; expected Str:D but got (Mu)

    (sorry for the spam)
    On Sat, May 28, 2016 at 10:00 PM Lloyd Fournier wrote:

    (continued :P)
    Type check failed in assignment to $a; expected Str:D but got Mu (Mu)
    in block <unit> at -e line 1

    It can also happen on assignment to array and hash elements.

    On Sat, May 28, 2016 at 9:59 PM Lloyd Fournier <
    perl6-bugs-followup@perl.org> wrote:
    # New Ticket Created by Lloyd Fournier
    # Please include the string: [perl #128277]
    # in the subject line of all future correspondence about this issue.
    # <URL: https://rt.perl.org/Ticket/Display.html?id=128277 >


    my Str:D $a = Nil; say $a; # (Str:D)
    say $a.VAR.default; #(Str:D)

    :D variables in general cannot have a default default. Therefore if the
    default default should be to throw an exception when it is acessed. My
    answer would be:
  • Lloyd Fournier at May 28, 2016 at 12:03 pm
    ^^ but that was wrong too.

    Type check failed in assignment to $a; expected Str:D but got Nil

    Going to go lie down for a bit now....

    On Sat, May 28, 2016 at 10:02 PM Lloyd Fournier wrote:

    Should be:

    Type check failed in assignment to $a; expected Str:D but got (Mu)

    (sorry for the spam)
    On Sat, May 28, 2016 at 10:00 PM Lloyd Fournier wrote:

    (continued :P)
    Type check failed in assignment to $a; expected Str:D but got Mu (Mu)
    in block <unit> at -e line 1

    It can also happen on assignment to array and hash elements.

    On Sat, May 28, 2016 at 9:59 PM Lloyd Fournier <
    perl6-bugs-followup@perl.org> wrote:
    # New Ticket Created by Lloyd Fournier
    # Please include the string: [perl #128277]
    # in the subject line of all future correspondence about this issue.
    # <URL: https://rt.perl.org/Ticket/Display.html?id=128277 >


    my Str:D $a = Nil; say $a; # (Str:D)
    say $a.VAR.default; #(Str:D)

    :D variables in general cannot have a default default. Therefore if the
    default default should be to throw an exception when it is acessed. My
    answer would be:

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-compiler @
categoriesperl
postedMay 28, '16 at 11:58a
activeMay 28, '16 at 12:03p
posts4
users2
websiteperl6.org

2 users in discussion

Lloyd Fournier: 3 posts Lloyd Fournier: 1 post

People

Translate

site design / logo © 2019 Grokbase