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

REPL messes up namespaces when Foo is used after Foo::Bar #1690

Open
zoffixznet opened this issue Apr 5, 2018 · 0 comments
Open

REPL messes up namespaces when Foo is used after Foo::Bar #1690

zoffixznet opened this issue Apr 5, 2018 · 0 comments
Labels

Comments

@zoffixznet
Copy link
Contributor

It looks like if Foo::Bar is loaded first, then loading Foo does not "update" the Foo namespace and it still remains the package or whatever (no idea how any of this stuff works):

2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ tree
.
├── ./Foo
│   └── ./Foo/Bar.pm6
└── ./Foo.pm6

1 directory, 2 files
2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ cat Foo/Bar.pm6 
unit class Foo::Bar;
2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ cat Foo.pm6 
unit class Foo;
2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ perl6 -I.
To exit type 'exit' or '^D'
> use Foo::Bar
Nil
> use Foo
Nil
> Foo.new
You cannot create an instance of this type (Foo)
  in block <unit> at <unknown file> line 1

> 
2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ perl6 -v
This is Rakudo version 2018.03-129-g7572983a4 built on MoarVM version 2018.03-35-gafdcad424
implementing Perl 6.c.
2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ 

2018.03.129 zoffix@VirtualBox/tmp/tmp.Bxz0IiPJW8$ perl6 -e 'class Foo::Bar {}; Foo.new'
You cannot create an instance of this type (Foo)
  in block <unit> at -e line 1
@zoffixznet zoffixznet added the REPL label Apr 5, 2018
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