-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from JakeWharton/jw/default-package
Support method references to sibling classes in the default package.
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright © 2013-2016 Esko Luontola and other Retrolambda contributors | ||
// This software is released under the Apache License 2.0. | ||
// The license text is at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
import org.junit.Test; | ||
|
||
public final class DefaultPackageTest { | ||
@Test | ||
public void method_reference_to_sibling_class() { | ||
SiblingClass sibling = new SiblingClass(); | ||
Runnable lambda = sibling::method; | ||
lambda.run(); | ||
} | ||
} | ||
|
||
class SiblingClass { | ||
void method() { | ||
} | ||
} |
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