Testing Primitives in Generics and Value Types (original) (raw)
Rahman USTA rahman.usta.88 at gmail.com
Sat Apr 21 14:55:49 UTC 2018
- Previous message (by thread): RFR: 8187645: [Nestmates] Update Pack200 and tests, to recognize and process new Nestmate attributes
- Next message (by thread): values vs. statics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I built valhalla from source code and want to test primitives in generics and value types.
For testing primitives I created Box class;
public class Box {
private final T t;
public Box(T t) {this.t= t;}
public T get() {return t;}
public static void main(String[] args){
Box<int> box= new Box<>(5);
System.out.println(box.get());
}
}
and tried to compile with javac in valhalla, but it gives;
Box.java:8: error: unexpected type Box box= new Box<>(5); ^ required: reference found: int 1 error
Do I miss something?
Additionally, can you point me to an example for testing value types if something is ready?
Thanks.
Rahman USTA Istanbul JUG https://istanbul-jug.org/
- Previous message (by thread): RFR: 8187645: [Nestmates] Update Pack200 and tests, to recognize and process new Nestmate attributes
- Next message (by thread): values vs. statics
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]