File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -729,7 +729,7 @@ object Checking {
729729 def checkExperimentalImports (trees : List [Tree ])(using Context ): Unit =
730730 def onlyExperimentalDefs = trees.forall {
731731 case _ : Import | EmptyTree => true
732- case stat : MemberDef => stat.symbol.isExperimental
732+ case stat : MemberDef => stat.symbol.isExperimental || stat.symbol.is( Synthetic )
733733 case _ => false
734734 }
735735 for case imp @ Import (qual, selectors) <- trees do
Original file line number Diff line number Diff line change @@ -2,5 +2,14 @@ import language.experimental.erasedDefinitions
22import annotation .experimental
33
44@ experimental
5- erased class CanThrow [- E <: Exception ]
5+ erased class CanThrow [- E <: Exception ](val i : Int = 0 )
6+
7+ @ experimental
8+ object Foo
9+
10+ @ experimental
11+ def bar = 1
12+
13+
14+
615
You can’t perform that action at this time.
0 commit comments