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()' doesn't work in Rakudo #1504

Closed
p6rt opened this issue Feb 15, 2010 · 5 comments
Closed

'Int()' doesn't work in Rakudo #1504

p6rt opened this issue Feb 15, 2010 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 15, 2010

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

Searchable as RT72834$

@p6rt
Copy link
Author

p6rt commented Feb 15, 2010

From @masak

<diakopter> std​: say Int()
<p6eval> std 29733​: OUTPUT«ok 00​:01 105m␤»
<diakopter> rakudo​: say Int()
<p6eval> rakudo 70667a​: OUTPUT«Could not find non-existent sub &Int [...]
* masak submits rakudobug
<diakopter> sprixel​: say Int()
<p6eval> sprixel 29734​: OUTPUT«NYI​: term__S_identifier␤»
<diakopter> hee
<masak> the fact that STD parses that one doesn't mean it should
produce anything sensible, though.
<masak> are .() calls with empty param lists made on type values
defined by the spec?
<masak> I know .perl produces them, so they oughta be...
<moritz_> not perl
<moritz_> stringification
<moritz_> rakudo​: say Int.perl
<p6eval> rakudo 70667a​: OUTPUT«Int␤»
<masak> right. thanks.
<moritz_> rakudo​: say ~Int
<p6eval> rakudo 70667a​: OUTPUT«Int()␤»
<masak> does that mean that 'Int()' isn't necessarily meaningful Perl 6 code?
<moritz_> aye
<diakopter> stdbug then?
<masak> no, it definitely parses.
<masak> nothing wrong with it as such.
<diakopter> no,
<masak> it's like 42[5].
<masak> it parses, but it doesn't mean anything sensible in Standard Perl 6.
<diakopter> it should parse only if Int were a subname, or it would fail.
<TimToady> well, it's coercing Nil
<frettled> Nil will not be coerced! :)
<TimToady> my Int $x = Nil; # specced to make Int
<diakopter> std​: class Boo { }; say Boo()
<p6eval> std 29734​: OUTPUT«ok 00​:01 105m␤»
<TimToady> so I suspect .() should just be identity on a type
<masak> noted in the rakudobug. thanks.

@p6rt
Copy link
Author

p6rt commented Aug 18, 2010

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

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

From @bbkr

NOM​:

bbkr​:nom bbkr$ ./perl6 -e 'Int()'
Could not find sub &Int

and worth noticing, possibly related parse bug

bbkr​:nom bbkr$ ./perl6 -e 'Int.()'
Method 'postcircumfix​:<( )>' not found for invocant of class 'Int'
  in <anon> at src/gen/Metamodel.pm​:2875

@p6rt
Copy link
Author

p6rt commented Mar 30, 2012

From @moritz

works now, and tested in S13-type-casting/methods.t

@p6rt
Copy link
Author

p6rt commented Mar 30, 2012

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 30, 2012
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant