sorear/niecza — Issue #76: Can't use the semicolon form of a class declaration after a 'use'
Author: masak
Created: 2011-10-31 22:42:33+00:00
State: open

sorear: I isolated it! \o/
sorear: https://gist.github.com/1329249
* masak submits nieczabug

Reproducing the gist here to save one click:

$ cat A.pm
class A;
$ cat B.pm
use A;

class B is A;

say "OH HAI"
$ niecza B.pm
===SORRY!===

Semicolon form of class definition not allowed in subscope;
please use block form at /tmp/B.pm line 3:
------> class B is A⏏;

Parse failed

$ niecza B.pm
OH HAI
$ rm ~/ours/niecza/obj/Run.A.*
$ niecza B.pm
===SORRY!===

Semicolon form of class definition not allowed in subscope;
please use block form at /tmp/B.pm line 3:
------> class B is A⏏;

Parse failed

$

It doesn't matter if `A` in `A.pm` is in semicolon form: the bug happens regardless.