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

It is no longer possible to create native ints with .new (int32.new(42)) #6611

Closed
p6rt opened this issue Oct 14, 2017 · 5 comments
Closed

It is no longer possible to create native ints with .new (int32.new(42)) #6611

p6rt opened this issue Oct 14, 2017 · 5 comments
Labels
regression Issue did not exist previously

Comments

@p6rt
Copy link

p6rt commented Oct 14, 2017

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

Searchable as RT132293$

@p6rt
Copy link
Author

p6rt commented Oct 14, 2017

From @AlexDaniel

Code​:
say int32.new(42)

¦«2016.10,2016.11,2016.12,2017.01,2017.02,2017.03,2017.04.3,2017.05,
  2017.06,2017.07,2017.08,2017.09»​:
42

¦«HEAD(012c80f)»​:
No such method 'BUILDALLPLAN' for invocant of type 'Perl6​::Metamodel​::NativeHOW'
in block <unit> at /tmp/B93UszWrfP line 1

Bisectable points at (2017-09-19) rakudo/rakudo@0834036

@p6rt
Copy link
Author

p6rt commented Oct 14, 2017

From @zoffixznet

On Fri, 13 Oct 2017 23​:08​:20 -0700, alex.jakimenko@​gmail.com wrote​:

Code​:
say int32.new(42)

¦«2016.10,2016.11,2016.12,2017.01,2017.02,2017.03,2017.04.3,2017.05,
2017.06,2017.07,2017.08,2017.09»​:
42

¦«HEAD(012c80f)»​:
No such method 'BUILDALLPLAN' for invocant of type
'Perl6​::Metamodel​::NativeHOW'
in block <unit> at /tmp/B93UszWrfP line 1

Bisectable points at (2017-09-19)
rakudo/rakudo@0834036

In the past, that code just creating a regular Int​:

  <Zoffix__> c​: 2017.06 multi x (int) { say "native" }; multi x (Int) { say "here" }; x int32.new(42)
  <committable6> Zoffix__, ¦2017.06​: «here»
  <Zoffix__> c​: 2017.06 multi x (int) { say "native" }; multi x (Int) { say "here" }; x my int32 $ = 42
  <committable6> Zoffix__, ¦2017.06​: «native»

So it was never possible to create them with .new. The old code just silently did the wrong thing, while the new behaviour gives crappy error.

@p6rt
Copy link
Author

p6rt commented Oct 14, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 14, 2017

From @zoffixznet

On Sat, 14 Oct 2017 03​:07​:16 -0700, cpan@​zoffix.com wrote​:

On Fri, 13 Oct 2017 23​:08​:20 -0700, alex.jakimenko@​gmail.com wrote​:

Code​:
say int32.new(42)

¦«2016.10,2016.11,2016.12,2017.01,2017.02,2017.03,2017.04.3,2017.05,
2017.06,2017.07,2017.08,2017.09»​:
42

¦«HEAD(012c80f)»​:
No such method 'BUILDALLPLAN' for invocant of type
'Perl6​::Metamodel​::NativeHOW'
in block <unit> at /tmp/B93UszWrfP line 1

Bisectable points at (2017-09-19)
rakudo/rakudo@0834036

In the past, that code just creating a regular Int​:

<Zoffix__> c​: 2017.06 multi x (int) { say "native" }; multi x (Int) {
say "here" }; x int32.new(42)
<committable6> Zoffix__, ¦2017.06​: «here»
<Zoffix__> c​: 2017.06 multi x (int) { say "native" }; multi x (Int) {
say "here" }; x my int32 $ = 42
<committable6> Zoffix__, ¦2017.06​: «native»

So it was never possible to create them with .new. The old code just
silently did the wrong thing, while the new behaviour gives crappy
error.

Restored old behaviour with a deprecation. After 2017.12 release, deprecation
will be removed and new behaviour will be to throw an error[^1]

Fix​: rakudo/rakudo@9d9c7f9c3b
Tests​: rakudo/rakudo@cc6c05586b

[1] https://irclog.perlgeek.de/perl6-dev/2017-10-14#i_15301629

@p6rt
Copy link
Author

p6rt commented Oct 14, 2017

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

@p6rt p6rt closed this as completed Oct 14, 2017
@p6rt p6rt added the regression Issue did not exist previously label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

1 participant