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

Nil.gist goes missing via type parameter #4564

Open
p6rt opened this issue Sep 20, 2015 · 3 comments
Open

Nil.gist goes missing via type parameter #4564

p6rt opened this issue Sep 20, 2015 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Sep 20, 2015

Migrated from rt.perl.org#126118 (status was 'open')

Searchable as RT126118$

@p6rt
Copy link
Author

p6rt commented Sep 20, 2015

From zefram@fysh.org

$ ./perl6 -e 'sub aa (Mu​:U :​:T) { say T; my T $a = T; say $a.WHAT; }; aa(Int); aa(Nil)'
(Int)
(Int)
Nil
Method 'gist' not found for invocant of class 'T'
  in sub aa at -e​:1
  in block <unit> at -e​:1

I'm mystified as to how the gist method goes missing there. It seems
entirely available when I'm not using a type parameter​:

$ ./perl6 -e 'say Int; my Int $a = Int; say $a.WHAT; say Nil; my Nil $b = Nil; say $b.WHAT;'
(Int)
(Int)
Nil
Nil

I also don't get an error if the "= T" is omitted, which is bizarre
because the variable contains the same value by default. The error
doesn't occur at the time of the assignment, though​: it only happens
with the say statement.

-zefram

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

From @AlexDaniel

That's a nice one. Still reproducible (2017.11, HEAD(5929887))

On 2015-09-20 09​:29​:41, zefram@​fysh.org wrote​:

$ ./perl6 -e 'sub aa (Mu​:U :​:T) { say T; my T $a = T; say $a.WHAT; };
aa(Int); aa(Nil)'
(Int)
(Int)
Nil
Method 'gist' not found for invocant of class 'T'
in sub aa at -e​:1
in block <unit> at -e​:1

I'm mystified as to how the gist method goes missing there. It seems
entirely available when I'm not using a type parameter​:

$ ./perl6 -e 'say Int; my Int $a = Int; say $a.WHAT; say Nil; my Nil
$b = Nil; say $b.WHAT;'
(Int)
(Int)
Nil
Nil

I also don't get an error if the "= T" is omitted, which is bizarre
because the variable contains the same value by default. The error
doesn't occur at the time of the assignment, though​: it only happens
with the say statement.

-zefram

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

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

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

No branches or pull requests

1 participant