Skip to content

Commit

Permalink
Units,java: record an input file causing a bug (universal-ctags#1739,…
Browse files Browse the repository at this point in the history
… anonymous class)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed May 22, 2018
1 parent bf8aa43 commit 33de706
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Units/parser-java.r/anonymous-class.b/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--sort=no
--fields=+n
--kinds-Java=+l
11 changes: 11 additions & 0 deletions Units/parser-java.r/anonymous-class.b/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
input input.java /^public class input {$/;" c line:2
greeting input.java /^ interface greeting {$/;" i line:3 class:input
greet input.java /^ public void greet(String word);$/;" m line:4 interface:input.greeting
hello input.java /^ public void hello () {$/;" m line:7 class:input
g input.java /^ greeting g = new greeting() {$/;" l line:8 method:input.hello
anonXXX input.java /^ greeting g = new greeting() {$/;" c line:8 method:input.hello
greet input.java /^ public void greet (String word) {$/;" m line:9 method:input.hello.anonXXX
bye input.java /^ public void bye () {$/;" m line:14 class:input
h input.java /^ greeting h = new greeting() {$/;" l line:15
anonYYY input.java /^ greeting g = new greeting() {$/;" c line:15 method:input.bye
greet input.java /^ public void greet (String word) {$/;" m line:16 method:input.hello.anonYYY
22 changes: 22 additions & 0 deletions Units/parser-java.r/anonymous-class.b/input.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// See #1739
public class input {
interface greeting {
public void greet(String word);
}

public void hello () {
greeting g = new greeting() {
public void greet (String word) {
}
};
g.greet("hello");
}
public void bye () {
greeting h = new greeting() {
public void greet (String word) {
}
};
h.greet("bye");
}

}

0 comments on commit 33de706

Please sign in to comment.