Extended case: if the "of" clause comes after an "is default" clause,
then the explicit default is not subjected to the type constraint.
Other behaviour remains the same.
$ ./perl6 -e 'my $a is default("foo") of Int; say $a'
foo
$ ./perl6 -e 'my $a is default("foo") of Int; $a = $a; say $a'
Type c
# New Ticket Created by Zefram
# Please include the string: [perl #126130]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126130 >
$ ./perl6 -e 'say Real.new'
[hangs]
^C
Like Numeric.new + 0 [perl #126112], there's a hang on
# New Ticket Created by herbert breunung
# Please include the string: [perl #126128]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126128 >
cheers as we have $~Main and $~Rregex , $~Quote should also be whole word for
consist
# New Ticket Created by Zefram
# Please include the string: [perl #126127]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126127 >
$ ./perl6 -e 'sub aa (Mu:wibble $a) { }; say "hi"'
hi
The :wibble, having no defined meaning,
# New Ticket Created by Zefram
# Please include the string: [perl #126126]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126126 >
$ ./perl6 -e 'say 3.isa(Mu:U)'
True
That's not the right answer for what I want Mu:U to do. A
# New Ticket Created by Zefram
# Please include the string: [perl #126125]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126125 >
Playing around trying to get a definedness constraint on a variable
(which I now understand is
# New Ticket Created by Zefram
# Please include the string: [perl #126124]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126124 >
$ ./perl6 -e 'sub aa (Mu:D $a) { }; aa(Int)'
Parameter '$a' requires an instance of type Int, b
# New Ticket Created by Zefram
# Please include the string: [perl #126123]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126123 >
S02 says this will produce a compiler error:
$ ./perl6 -e 'my Int $a of Str; say "hi"'
hi
The
# New Ticket Created by Zefram
# Please include the string: [perl #126122]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126122 >
Reusing again the function I explained in [perl #126119], let's look
at 1950:
$ ./perl6 -e 'su
# New Ticket Created by Zefram
# Please include the string: [perl #126121]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126121 >
Reusing the function I explained in [perl #126119], let's look at 1970:
$ ./perl6 -e 'sub leap
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #126120]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126120 >
[19:22:03] m: role R { has int $!a }; class A does R { method a()
{ $!a = 42
# New Ticket Created by Zefram
# Please include the string: [perl #126119]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126119 >
The Instant class supposedly represents times on the TAI time scale,
with subtraction of Instan
# New Ticket Created by Zefram
# Please include the string: [perl #126118]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126118 >
$ ./perl6 -e 'sub aa (Mu:U ::T) { say T; my T $a = T; say $a.WHAT; }; aa(Int);
aa(Nil)'
(Int)
# New Ticket Created by Zefram
# Please include the string: [perl #126117]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126117 >
How nice to be able to use a constant declaration to give a local name
to a (possibly complex)
# New Ticket Created by Zefram
# Please include the string: [perl #126116]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126116 >
Because a type object is an (undefined) instance of that type, it can
in general be stored in a
On 09/20/2015 09:55 AM, Tobias Leich (via RT) wrote:
> # New Ticket Created by Tobias Leich
> # Please include the string: [perl #126113]
> # in the subject line of all future correspondence about this issue.
> # https://rt.perl.org/Ticket/Display.html?id=126113 >
>
>
> t/spec/S02-names/pseud
# New Ticket Created by Zefram
# Please include the string: [perl #126115]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126115 >
Failure.new is a perfectly valid value that can be stored in a scalar
variable:
$ ./perl6 -e '
# New Ticket Created by Tobias Leich
# Please include the string: [perl #126113]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126113 >
t/spec/S02-names/pseudo.t expects that you can do:
use Test; plan 1;
sub f3() {
18 matches
Mail list logo