You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error coming from the following would be more useful if it were to complain about the undefined value in some way; what I really want is a documented way to test if it's undefined like this. For the record, calling defined($!height) inside foo() also fails.
#!/usr/bin/raku
use Physics::Unit;
use Physics::Measure;
class Test {
has Length $.length;
has Length $.width;
method foo {
say $!length <=> $!width;
}
}
my $a = Test.new();
$a.foo();
HTH,
The text was updated successfully, but these errors were encountered:
The error coming from the following would be more useful if it were to complain about the undefined value in some way; what I really want is a documented way to test if it's undefined like this. For the record, calling
defined($!height)
insidefoo()
also fails.HTH,
The text was updated successfully, but these errors were encountered: