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

Bugfix type initialization error on initializing caller sensitive functional interface #563

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/IKVM.Java.Tests/java/lang/invoke/MethodHandleTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.lang.*;
import java.lang.invoke.*;
import java.util.*;
import java.util.function.*;

@cli.Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute.Annotation()
public class MethodHandleTests {
Expand Down Expand Up @@ -90,4 +91,19 @@ public void canInvokeStaticMethodThatReturnsVoid() throws Throwable {
};
}

@cli.Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute.Annotation()
public void canInvokeThroughSupplier() throws Throwable { // Issue #509
Class<?> effectiveAnchor = MethodHandleTests.class;
final Supplier<ClassLoader> supplier = new Supplier() {
private final Supplier<? extends ClassLoader> supplier = effectiveAnchor::getClassLoader;

@Override
public ClassLoader get() {
return supplier.get();
}
};

final ClassLoader classLoader = supplier.get();
}

}
Loading