Last active
June 15, 2022 09:20
-
-
Save patrickbkr/52c482d25fa0eb074efe2a8101949695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Red; | |
enum E <E1>; | |
model M { | |
has E $.e is column is rw; | |
} | |
my M $m1 .= new: e => E1; | |
my M $m2 .= new: e => $m1.e; | |
dd $m2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Red; | |
enum E <E1>; | |
model M { | |
has E $.e is column is rw; | |
} | |
my M $m1 .= new: e => E1; | |
my $c = $m1.^columns[0]; | |
dd $c.type; | |
say $m1.e ~~ $c.type; # False | |
say $m1.e ~~ E; # True | |
say E1 ~~ $c.type; # True | |
say E1 ~~ E; # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment