Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3491,7 +3491,7 @@ object Parsers {
val hkparams = typeParamClauseOpt(ParamOwner.Hk)
val bounds =
if paramOwner.acceptsCtxBounds then typeAndCtxBounds(name)
else if in.featureEnabled(Feature.modularity) && paramOwner == ParamOwner.Type then typeAndCtxBounds(name)
else if sourceVersion.isAtLeast(`3.6`) && paramOwner == ParamOwner.Type then typeAndCtxBounds(name)
else typeBounds()
TypeDef(name, lambdaAbstract(hkparams, bounds)).withMods(mods)
}
Expand Down
3 changes: 0 additions & 3 deletions tests/pos/contextbounds-for-poly-functions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import scala.language.experimental.modularity
import scala.language.future

trait Ord[X]:
def compare(x: X, y: X): Int
type T
Expand Down
3 changes: 0 additions & 3 deletions tests/run/contextbounds-for-poly-functions.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import scala.language.experimental.modularity
import scala.language.future

trait Show[X]:
def show(x: X): String

Expand Down
Loading