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

LTA error message when an unknown type is used for hides/does/of/as/returns #4414

Closed
p6rt opened this issue Jul 19, 2015 · 4 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Jul 19, 2015

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

Searchable as RT125642$

@p6rt
Copy link
Author

p6rt commented Jul 19, 2015

From @hoelzro

For example​:

  > my sub foo() returns Bar { }
  ===SORRY!=== Error while compiling <unknown file>
  Invalid typename
  at <unknown file>​:1
  ------> sub foo returns⏏ Bar { }

While the line number is probably enough to figure out what's going on, having a little added information would be nice.

@p6rt
Copy link
Author

p6rt commented Jul 20, 2015

From @jnthn

On Sat Jul 18 20​:02​:22 2015, rob@​hoelz.ro wrote​:

For example​:

my sub foo() returns Bar { }
===SORRY!=== Error while compiling <unknown file>
Invalid typename
at <unknown file>​:1
------> sub foo returns⏏ Bar { }

While the line number is probably enough to figure out what's going
on, having a little added information would be nice.

Now it includes the typename and suggestions​:

$ perl6-m -e "my sub foo() returns Bar { }"
===SORRY!=== Error while compiling -e
Invalid typename 'Bar'. Did you mean 'Bag'?
at -e​:1
------> my sub foo() returns Bar<HERE> { }

Unless you were wildly off and we can't even parse a longname there, in which case you get​:

$ perl6-m -e "my sub foo() returns !!!WTF???? { }"
===SORRY!=== Error while compiling -e
Malformed trait
at -e​:1
------> my sub foo() returns<HERE> !!!WTF???? { }

Tests in S32-exceptions/misc.t.

@p6rt
Copy link
Author

p6rt commented Jul 20, 2015

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

@p6rt p6rt closed this as completed Jul 20, 2015
@p6rt
Copy link
Author

p6rt commented Jul 20, 2015

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

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