Skip to content

Commit

Permalink
Reclassify test
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Sep 29, 2021
1 parent 7983a2f commit b3d2173
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CheckNoSuperThis extends MiniPhase:

override def runsAfterGroupsOf: Set[String] = Set(Constructors.name)

override def transformDefDef(mdef: DefDef)(using Context): DefDef =
override def transfo rmDefDef(mdef: DefDef)(using Context): DefDef =
if mdef.symbol.isClassConstructor then
mdef.rhs match
case Block(stats, _) => splitAtSuper(stats) match
Expand Down
5 changes: 0 additions & 5 deletions tests/neg/i11045.scala

This file was deleted.

5 changes: 5 additions & 0 deletions tests/pos/i11045.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
abstract class Foo(x: Any)
class Boom(var x: Unit, y: Unit) extends Foo((x: Int) => x) // was error: super constructor cannot be passed a self reference
@main def Test =
Boom((), ())

0 comments on commit b3d2173

Please sign in to comment.