🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
02:59 vrurg_ joined 03:01 vrurg left 03:05 vrurg joined, vrurg_ left 08:40 vrurg_ joined 08:43 vrurg left 09:24 sena_kun joined 10:38 nine left, nine joined
Geth rakudo/main: b06e170b9a | (Elizabeth Mattijsen)++ | 4 files
RakuAST: make `use variable|attributes' work

  - ensure (un)definedness is wrapped if so indicated in pragma
  - add "through-pragma" attribute to indicate it was added by pragma (or not)
  - adapt deparsing / rakufying accordingly
Note that this only adds the runtime check. A compile time check for lack of initializer in the :D case, will still need to be added.
lizmat m: use variables :D; my int $a # I'd argue that native types should be excluded 10:53
camelia ===SORRY!=== Error while compiling <tmp>
Variable definition of type int:D (implicit :D by pragma) needs to be given an initializer
at <tmp>:1
------> gue that native types should be excluded⏏<EOL>
Geth rakudo/main: 17e3d0e6c7 | (Elizabeth Mattijsen)++ | 3 files
RakuAST: don't apply pragma semantics to native types

Since you can only have definite values in native types, it doesn't make sense to apply "use variables/attributes" semantics to them.
This adds an "is-native" method to the RakuAST::Type tree.
Also fix a deparsing issue when a specific type was already specified.
12:38 gfldex left 13:40 gfldex joined 13:41 gfldex left, gfldex joined 17:43 gfldex left 17:54 gfldex joined 18:00 gfldex left 18:04 gfldex joined
tonyo . 20:41
23:03 sena_kun left