Skip to content

Missing unchecked cast warning in polymorphic method call #3651

@stephan-herrmann

Description

@stephan-herrmann

Ecj exhibits the same bug that javac < 24 did:

 import java.lang.invoke.VarHandle;
class VarHandleCast<V> {
     VarHandle vh;
     V method(Object obj) {
         return (V)vh.getAndSet(this, obj);
     }
} 

this should trigger an unchecked cast warning, but doesn't.

See https://bugs.openjdk.org/browse/JDK-8343286

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions