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

int and num think they're not Mu in Rakudo #2537

Closed
p6rt opened this issue Oct 26, 2011 · 6 comments
Closed

int and num think they're not Mu in Rakudo #2537

p6rt opened this issue Oct 26, 2011 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Oct 26, 2011

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

Searchable as RT102256$

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

From @masak

<moritz> nom​: say num ~~ num
<p6eval> nom 97aa73​: OUTPUT«Method 'ACCEPTS' not found for invocant of
class 'num' [...]
<moritz> nom​: say num ~~ Num
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<moritz> nom​: say num ~~ Mu
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<moritz> woah.
<jnthn> nom​: say int ~~ Mu
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<jnthn> hm :)
<jnthn> Well, it's a native, not an object but... :)
<moritz> nom​: say num.defined
<p6eval> nom 97aa73​: OUTPUT«Method 'defined' not found for invocant of
class 'num' [...]
<jnthn> Yeah, that's wrong
<jnthn> nom​: say num
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'num' [...]
<jnthn> huh
<jnthn> I'm sure that used to work.
<jnthn> nom​: say int
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'int' [...]
<moritz> jnthn​: it even says 'class' in the error message, so if it's
a class, it must be ~~ Mu :-)
<jnthn> I'm really sure that one did.
<jnthn> nom​: say int.^methods
<p6eval> nom 97aa73​: OUTPUT«Method 'dispatch​:<.^>' not found for
invocant of class 'int' [...]
* moritz writes more tests
<jnthn> nom​: say int.HOW.mro(int)
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'int' [...]
<jnthn> oh
<jnthn> that'll do it.
<masak> bug?
<jnthn> yeah, looks like
* masak submits
<jnthn> somehow it's not building the MRO properly.
<jnthn> And since method dispatch and type checking are all done by
MRO...yeah, not surprising.
<jnthn> ENEEDMOARTESTS ;)
<moritz> really? I thought the problem is that .mro returns a Parcel,
and Parcel.gist recurses into the elements
<moritz> and hits int.gist, and dies
<moritz> at least that's what the p6eval output tells me

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

From @masak

On Wed Oct 26 06​:04​:19 2011, masak wrote​:

<moritz> nom​: say num ~~ num
<p6eval> nom 97aa73​: OUTPUT«Method 'ACCEPTS' not found for invocant of
class 'num' [...]
<moritz> nom​: say num ~~ Num
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<moritz> nom​: say num ~~ Mu
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<moritz> woah.
<jnthn> nom​: say int ~~ Mu
<p6eval> nom 97aa73​: OUTPUT«Bool​::False␤»
<jnthn> hm :)
<jnthn> Well, it's a native, not an object but... :)
<moritz> nom​: say num.defined
<p6eval> nom 97aa73​: OUTPUT«Method 'defined' not found for invocant of
class 'num' [...]
<jnthn> Yeah, that's wrong
<jnthn> nom​: say num
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'num' [...]
<jnthn> huh
<jnthn> I'm sure that used to work.
<jnthn> nom​: say int
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'int' [...]
<moritz> jnthn​: it even says 'class' in the error message, so if it's
a class, it must be ~~ Mu :-)
<jnthn> I'm really sure that one did.
<jnthn> nom​: say int.^methods
<p6eval> nom 97aa73​: OUTPUT«Method 'dispatch​:<.^>' not found for
invocant of class 'int' [...]
* moritz writes more tests
<jnthn> nom​: say int.HOW.mro(int)
<p6eval> nom 97aa73​: OUTPUT«Method 'gist' not found for invocant of
class 'int' [...]
<jnthn> oh
<jnthn> that'll do it.
<masak> bug?
<jnthn> yeah, looks like
* masak submits
<jnthn> somehow it's not building the MRO properly.
<jnthn> And since method dispatch and type checking are all done by
MRO...yeah, not surprising.
<jnthn> ENEEDMOARTESTS ;)
<moritz> really? I thought the problem is that .mro returns a Parcel,
and Parcel.gist recurses into the elements
<moritz> and hits int.gist, and dies
<moritz> at least that's what the p6eval output tells me

<jnthn> moritz​: oh...
<jnthn> moritz​: I read the wrong live of p6eval output
<jnthn> nom​: say int.HOW.mro(int).elems
<p6eval> nom cbc652​: OUTPUT«1␤»
<jnthn> ok, *that* is a problem :)
<moritz> aye :-)
<masak> ok, that goes into the ticket.

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

@masak - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

From @moritz

Tested in S02-types/native.t

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

From @jnthn

On Wed Oct 26 06​:07​:16 2011, masak wrote​:

...
<jnthn> nom​: say int.HOW.mro(int).elems
<p6eval> nom cbc652​: OUTPUT«1␤»
<jnthn> ok, *that* is a problem :)
<moritz> aye :-)
<masak> ok, that goes into the ticket.

Fixed now; moritz++ added tests, which I've now unfudged, so resolving.

Thanks,

/jnthn

@p6rt
Copy link
Author

p6rt commented Oct 26, 2011

@jnthn - Status changed from 'open' 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