Skip to content

Commit 8151e96

Browse files
committed
fead: add in 061
Adding `// LEGACY` to 061. It seems like TopLevelCantBeImplicit is no longer the case thanks to scala/scala3#5754 This is actually confirmed in https://github.com/lampepfl/dotty/blob/93fc41fcb624df73cc12d52b79d518a30a778a7c/tests/run/toplevel-implicits/a.b.scala#L19-L21
1 parent d68823e commit 8151e96

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
// I can't seem to reproduce this one. I see in `Checking.scala` that is should
2-
// be it if sym.owner.is(Package), but when playing around that doesn't seem to
3-
// ever be true
4-
// INCOMPLETE
1+
// LEGACY In the past top level implicit were not allowed. This is however no longer the case as of https://github.com/lampepfl/dotty/pull/5754
2+
// START
53
@main def TopLevelCantBeImplicitID = ()
64

5+
import scala.language.implicitConversions
6+
case class C(str: String)
7+
implicit def toC(x: String): C = C(x)
8+
implicit val defaultC: C = C("default")
9+
// END

0 commit comments

Comments
 (0)