diff --git a/compiler/src/dotty/tools/dotc/config/Feature.scala b/compiler/src/dotty/tools/dotc/config/Feature.scala index 6df190f3147e..a53346c8a44d 100644 --- a/compiler/src/dotty/tools/dotc/config/Feature.scala +++ b/compiler/src/dotty/tools/dotc/config/Feature.scala @@ -61,7 +61,8 @@ object Feature: (pureFunctions, "Enable pure functions for capture checking"), (captureChecking, "Enable experimental capture checking"), (into, "Allow into modifier on parameter types"), - (modularity, "Enable experimental modularity features") + (modularity, "Enable experimental modularity features"), + (packageObjectValues, "Enable experimental package objects as values"), ) // legacy language features from Scala 2 that are no longer supported. diff --git a/tests/pos/packageObjectValues.scala b/tests/pos/packageObjectValues.scala new file mode 100644 index 000000000000..7133c6a01471 --- /dev/null +++ b/tests/pos/packageObjectValues.scala @@ -0,0 +1,7 @@ +//> using options -language:experimental.packageObjectValues + +package object p { } + +object Test: + val x = p +