Skip to content

CSEC: isSubtype does not handle primitives properly #77

Description

@mattcce

The following code:

class C {
    public void r(String s) {
        
    }
    
    public void r(int s) {
        
    }
    
    public static void main(String[] args) {
        String s = "test";
        C c = new C();
        
        c.r(s);
    }
}

breaks with the error RuntimeError: Class String not declared.

The error occurs during overloading resolution; and is because isSubtype does not handle primitives properly at all.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions