- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    repo-valhalla
- 
    None
                    1. Compile the sample test.
2. Start jdb:
$ jdb -classpath . -XX:+EnableValhalla Test
3. Set breakpoint on the line with System.out.println()
> stop at Test:8
4. Run to breakpoint
> run
5. Assign null to variable v
> set v = null
or
> eval v = null
6. Print value of v
> print v
Expected result:
On step 5 the error "error: incompatible types: <null> cannot be converted to MyValue" should be reported
Actual result:
Step 5 succeeds. Step 6 outputs "v = null"
===============================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
System.out.println("v == v " + (v == v));
}
public final __ByValue static class MyValue {
int a;
char b;
public MyValue(int a, char b){
this.a = a;
this.b = b;
}
}
}
            
2. Start jdb:
$ jdb -classpath . -XX:+EnableValhalla Test
3. Set breakpoint on the line with System.out.println()
> stop at Test:8
4. Run to breakpoint
> run
5. Assign null to variable v
> set v = null
or
> eval v = null
6. Print value of v
> print v
Expected result:
On step 5 the error "error: incompatible types: <null> cannot be converted to MyValue" should be reported
Actual result:
Step 5 succeeds. Step 6 outputs "v = null"
===============================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
System.out.println("v == v " + (v == v));
}
public final __ByValue static class MyValue {
int a;
char b;
public MyValue(int a, char b){
this.a = a;
this.b = b;
}
}
}
- is cloned by
- 
                    JDK-8211027 jdb "eval" should perform substitutability test when applying == to inline types -           
- Resolved
 
-         
- 
                    JDK-8211028 jdb "eval" should allow to create a new value type instance with specified fields -           
- Closed
 
-