Skip to content

Compatibility issue with Scala at runtime #6450

Closed
@newca12

Description

@newca12

This was initially reported on the dotty gitter channel by @Jasper-M but I did not find an open issue for that.
The behaviour is the same with -language:Scala2

Scala

scala> class Foo { def A(i: Double) = i; object A{ def apply(i: Int) = i+1 }; def foo = A(0) }
defined class Foo

scala> new Foo().foo
res6: Int = 1

Dotty

scala> class Foo { def A(i: Double) = i; object A{ def apply(i: Int) = i+1 }; def foo = A(0) }
// defined class Foo

scala> new Foo().foo
val res0: Double = 0.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions