mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
Fix for KT-10313: ClassCastException with Generics
#KT-10313 Fixed
This commit is contained in:
committed by
Michael Bogdanov
parent
edf6a2142b
commit
0073257841
15
compiler/testData/codegen/boxWithJava/casts/literalExpressionAsGenericArgument/Box.java
vendored
Normal file
15
compiler/testData/codegen/boxWithJava/casts/literalExpressionAsGenericArgument/Box.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
public class Box<T> {
|
||||
private final T value;
|
||||
|
||||
public Box(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static <T> Box<T> create(T defaultValue) {
|
||||
return new Box(defaultValue);
|
||||
}
|
||||
|
||||
public T getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user