Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subset produces Cannot invoke this object (REPR: Null; VMNull) #5758

Closed
p6rt opened this issue Oct 18, 2016 · 4 comments
Closed

Subset produces Cannot invoke this object (REPR: Null; VMNull) #5758

p6rt opened this issue Oct 18, 2016 · 4 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Oct 18, 2016

Migrated from rt.perl.org#129912 (status was 'resolved')

Searchable as RT129912$

@p6rt
Copy link
Author

@p6rt p6rt commented Oct 18, 2016

From @zoffixznet

There is some combination of subset/multi that causes Cannot invoke
this object (REPR​: Null; VMNull) error to be displayed​:

<ZoffixW> m​: subset InfTan of Numeric where $_ == 1; multi tan
(InfTan) {}; say tan(2)
<camelia> rakudo-moar f7770e​: OUTPUT«Cannot invoke this object (REPR​:
Null; VMNull)␤ in any accepts_type at gen/moar/m-Metamodel.nqp line
3472␤ in sub tan at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
<ZoffixW> m​: subset InfTan of Num where $_ % (π/2) ≅ 0; multi tan
(InfTan) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e​: OUTPUT«Cannot invoke this object (REPR​:
Null; VMNull)␤ in any accepts_type at gen/moar/m-Metamodel.nqp line
3472␤ in sub tan at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»

Yet, slightly altered variations such as changing base type of subset,
the where condition, or multi-to-only do not produce that error​:

<ZoffixW> m​: subset InfTan of Num where $_ == 1; multi tan (InfTan)
{}; say tan(2)
<camelia> rakudo-moar f7770e​: OUTPUT«-2.18503986326152␤»
<ZoffixW> m​: subset InfTan of Num where $_ == 1; multi tan (InfTan)
{}; say tan(2)
<camelia> rakudo-moar f7770e​: OUTPUT«-2.18503986326152␤»
<ZoffixW> m​: multi tan ($ where * % (π/2) ≅ 0 ) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e​: OUTPUT«-1.22464679914735e-16␤»
<ZoffixW> m​: multi tan ($ where $_ % (π/2) ≅ 0 ) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e​: OUTPUT«-1.22464679914735e-16␤»
<ZoffixW> m​: subset InfTan of Num; multi tan (InfTan) { ∞ }; say tan(π)
<camelia> rakudo-moar f7770e​: OUTPUT«Inf␤»
<ZoffixW> m​: subset InfTan of Num where * % (π/2) ≅ 0; say tan(π) ~~ InfTan
<camelia> rakudo-moar f7770e​: OUTPUT«False␤»

@p6rt
Copy link
Author

@p6rt p6rt commented Dec 14, 2016

From @zoffixznet

Seems an optimizer bug. Running with --optimize=off does not have the issue present.

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 7, 2018

From @zoffixznet

On Wed, 14 Dec 2016 15​:14​:27 -0800, cpan@​zoffix.com wrote​:

Seems an optimizer bug. Running with --optimize=off does not have the
issue present.

Fixed and tested as rakudo/rakudo#1465

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 7, 2018

@zoffixznet - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant