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

Improve error message for annotation insertion attempt on (non-existent) receiver of non-inner constructor #74

Open
GoogleCodeExporter opened this issue Jul 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

insert-annotation{,-to-source} should give a more specific message -- e.g. 
"top-level constructors do not have receivers" -- when the input JAIF indicates 
an insertion on the (non-existent) receiver of a non-inner constructor.  
Excerpt from emailed example submission follows.

Subject: Re: inference of the jaif
From: Damiano Macedonio <damiano.macedonio@juliasoft.com>

When you run
insert-annotations-to-source OsTrusted.jaif Test.java
you will obtain Test.java.annotated. Then its type checking will end up with 
the following errors:

annotated/com/juliasoft/test/Test.java:24: error: the receiver type does not 
match the enclosing outer class type
        NestedStatic(Test.@OsUntrusted NestedStatic this) {
                          ^
  required: Test
  found: NestedStatic
annotated/com/juliasoft/test/Test.java:24: error: the receiver name does not 
match the enclosing outer class type
        NestedStatic(Test.@OsUntrusted NestedStatic this) {
                                                    ^
  required: Test
  found: NestedStatic
2 errors

Original issue reported on code.google.com by d...@cs.washington.edu on 21 Feb 2014 at 11:04

Attachments:

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

No branches or pull requests

2 participants