Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

RT #112724, line numbers from warnings

  • Loading branch information...
commit d9f7caae3d75bdaa7f3204aa1f7342f5e9f9a26d 1 parent 353a80c
@moritz moritz authored
Showing with 14 additions and 1 deletion.
  1. +1 −0  S32-exceptions/misc.t
  2. +13 −1 integration/error-reporting.t
View
1  S32-exceptions/misc.t
@@ -114,6 +114,7 @@ throws_like 'my $0', X::Syntax::Variable::Numeric;
throws_like 'my sub f($0) { }', X::Syntax::Variable::Numeric, what => 'parameter';
throws_like 'my $<a>', X::Syntax::Variable::Match;
throws_like 'my class A { my $!foo }', X::Syntax::Variable::Twigil, twigil => '!', scope => 'my';
+throws_like 'my $?FILE', X::Syntax::Variable::Twigil, twigil => '?', scope => 'my';
throws_like 'my $::("foo")', X::Syntax::Variable::IndirectDeclaration;
throws_like '@a', X::Undeclared, symbol => '@a';
throws_like 'augment class Any { }', X::Syntax::Augment::WithoutMonkeyTyping;
View
14 integration/error-reporting.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 10;
+plan 11;
BEGIN { @*INC.push('t/spec/packages') };
@@ -88,4 +88,16 @@ is_run 'my $ = 2; my $ = 3; say q[alive]',
out => "alive\n",
}, 'multiple anonymous variables do not warn or err out';
+# RT #112724
+#?niecza todo
+is_run 'sub mysub {
+ + Any # trigger an uninitialized warning
+ };
+ mysub()',
+ {
+ status => 0,
+ err => /<<2>>/ & /<<mysub>>/,
+ out => '',
+ }, 'warning reports correct line number and subroutine';
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.