jshell> class Z {}
| created class Z
jshell> var myVariable = new Z()
| Error:
| unexpected type
| required: class
| found: type parameter Z
| var myVariable = new Z();
| ^
Apparently there's some internal construct that leaks the type variable Z into the user's namespace.
https://stackoverflow.com/questions/62102369/jshell-error-unexpected-type-when-using-specific-class-name
| created class Z
jshell> var myVariable = new Z()
| Error:
| unexpected type
| required: class
| found: type parameter Z
| var myVariable = new Z();
| ^
Apparently there's some internal construct that leaks the type variable Z into the user's namespace.
https://stackoverflow.com/questions/62102369/jshell-error-unexpected-type-when-using-specific-class-name