This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
new compile-time typeof operator #122
Labels
Comments
can it be indexed again i.e. in a variable declaration? |
@vendethiel can you reformulate your question? |
can you use typeof as the type of a variable? |
Sure, that's the idea when using it with eval. Note that you cannot do that with ref, but ref is only for introspection and was On Mar 30, 2016 16:39, "ven" [email protected] wrote:
|
this ticket was wrongly closed |
Oops, thanks. I really should add support for functions also. |
rurban
added a commit
that referenced
this issue
Oct 16, 2018
fixed some -Wsign-compare See L<https://metacpan.org/changes/distribution/Encode> Skip the flapping test F<t/Aliases.t> on threaded smokers, with random segfaults. This is a long standing core bug, with PMOP aliases or clone. First observed at L<rurban/perl-compiler#73> (since 5.6) Stop directory tweaking C<$Encode::Encoding{utf8}> Fix gcc warnings for older gcc < 4.0 Where possible do not depend on value of $@, instead use return value of eval Fix more XS problems in Encode.xs file Load modules Encode::MIME::Name and Storable normally Remove no warnings redefine; and correctly loaddependences Remove PP stubs and reformat predefine_encodings() Run Encode XS BOOT code at compile time Use Encode::define_encoding and propagate carp/croak message cperl fixes: encoding undeprecated, no strict hashpairs Cleanup code for handling fallback/replacement characters lib/Encode/MIME/Name.pm t/mime-name.t Pulled: Add "euc-cn" => "EUC-CN" alias to Encode::MIME::Name dankogai/p5-encode#124 lib/Encode/CN/HZ.pm lib/Encode/JP/JIS7.pm lib/Encode/MIME/Header.pm t/decode.t Pulled: Uninitialized value fixes #122 dankogai/p5-encode#122 Makefile.PL Pulled: Fix -Werror=declaration-after-statement for gcc 4.1.2 dankogai/p5-encode#121 Fixed deep recursion in Encode::find_encoding when decoding.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
returns the type(s) at compile-time. which is string or list of strings or a list of type expressions.
currently the string comes from the stash name, but in the future a type can also be an object (as in perl6), not a stash. the return value of typeof must be parsable as valid type declaration. so it should honor list context to listify
|
alternations.similar to ref, which returns one run-time string, the current type. (but even if the value contains multiple types, only one is returned with ref).
but typeof gets the type from the OP*, not the attached SV*.
The text was updated successfully, but these errors were encountered: