forked from INRIA/spoon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: reproduce bug for issue INRIA#3052
- Loading branch information
Antoine Veuiller
committed
Jul 20, 2019
1 parent
ee0c74c
commit 166e080
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/test/resources/noclasspath/lambdas/UnknownSourceLambdaInnerClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
public class Test { | ||
/** | ||
* This class will be built with an '(Unknown source)' as position | ||
*/ | ||
static class Failing { | ||
ClickListener listener; | ||
} | ||
|
||
private static class ExtendedClass extends Failing { | ||
public void test(View itemView) { | ||
// The difference in behaviour happens if I comment this line out | ||
itemView.setOnClickListener(v -> listener.onItemClick(getAdapterPosition())); | ||
} | ||
} | ||
|
||
// TODO: I wanted to add a class showing a successful input in the processor but adding it raise another error from JDTTreeBuilder, if you could have a look :) | ||
/** | ||
* This class will be built with the right position | ||
*/ | ||
// static class Success { | ||
// ClickListener listener; | ||
// } | ||
// | ||
// private static class ExtendedClass extends Success { | ||
// public void test(View itemView) { | ||
// itemView.setOnClickListener(new Runnable()); | ||
// } | ||
// } | ||
} |