Skip to content

Type.matches is still incomplete #814

Closed
@DarkDimius

Description

@DarkDimius

ListBuffer += does not match Growable += before erasure.
Here are their types:

ListBuffer.+= MethodType(List(xs), List(RefinedType(TypeRef(ThisType(TypeRef(NoPrefix,collection)),TraversableOnce), scala$collection$TraversableOnce$$A, TypeAlias(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,mutable)),ListBuffer)),scala$collection$mutable$ListBuffer$$A)) | -1582256965)), 
/*returnType*/ ThisType(TypeRef(ThisType(TypeRef(NoPrefix,mutable)),ListBuffer)))

Growable  .+= MethodType(List(xs), List(RefinedType(TypeRef(ThisType(TypeRef(NoPrefix,collection)),TraversableOnce), scala$collection$TraversableOnce$$A, TypeAlias(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,generic)),Growable)),scala$collection$generic$Growable$$A)) | 607071156)), 
/*returnType*/ ThisType(TypeRef(ThisType(TypeRef(NoPrefix,generic)),Growable)))

matchingParams for those types is false, and the only thing that is different is type aliases inside.
Note that ListBuffer[A] extends Builder[A, List[A]], and Builder[A, List[A]] extends Growable[A], so I guess those type aliases should be considered =:=

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions