Skip to content

Regression in getkyo/kyo - clashing non-existing bridges of overriden inline method #23451

Closed
@WojciechMazur

Description

@WojciechMazur

Based on OpenCB failure in getkyo/kyo - build logs

Compiler version

Last good release: 3.7.3-RC1-bin-20250623-0a4b6ec-NIGHTLY
First bad release: 3.7.3-RC1-bin-20250624-8f0d12b-NIGHTLY

Bisect points to f68bd83 / #23404

Minimized code

trait Inliner[A]:
    inline def apply[T]: A
    
class SummonInliner[F[_]] extends Inliner[ForSome[F]]:
    inline def apply[T]: ForSome[F] = ForSome(compiletime.summonInline[F[T]])
            
type ForSome[F[_]] = ForSome.Type[F]
object ForSome:
    type Type[F[_]] = Unwrap[F, ?]
    class Unwrap[F[_], A](val unwrap: F[A]) extends AnyVal

    inline def apply[F[_], A](v: F[A]): Type[F] = Unwrap(v)

Output

-- Error: /Users/wmazur/projects/scala/sandbox/example.scala:5:15 ------------------------------------------------------------------------------------------------------------------------------------------
5 |    inline def apply[T]: ForSome[F] = ForSome(compiletime.summonInline[F[T]])
  |               ^
  |               bridge generated for member method apply[T]: ForSome.Type[F] in class SummonInliner
  |               which overrides method apply[T]: A in trait Inliner
  |               clashes with definition of the member itself; both have erased type (): Object."

Expectation

I believe this is a false negative - when inspecting .class files generated by older versions of the compiler there is no apply method in either Inliner or SummonInliner classes.

Metadata

Metadata

Assignees

Labels

itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions