Skip to content

Commit 238a93a

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 c39ca86 commit 238a93a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ hasn't been figure out, or is it because the code that references the specific
5555
- [ ] 047 CyclicReferenceInvolvingImplicitID - See notes in the file
5656
- [ ] 054 ParameterizedTypeLacksArgumentsID
5757
- [ ] 059 DoesNotConformToSelfTypeCantBeInstantiated
58-
- [ ] 061 TopLevelCantBeImplicitID
5958

6059
## Getting Started
6160

+7-4
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)