File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1033,7 +1033,7 @@ object desugar {
10331033 case stat : TypeDef if stat.mods.is(Opaque ) => stat.name
10341034 }
10351035 def needsObject (stat : Tree ) = stat match {
1036- case _ : ValDef | _ : PatDef | _ : DefDef => true
1036+ case _ : ValDef | _ : PatDef | _ : DefDef | _ : Export => true
10371037 case stat : ModuleDef =>
10381038 stat.mods.is(ImplicitOrImplied ) || opaqueNames.contains(stat.name.stripModuleClassSuffix.toTypeName)
10391039 case stat : TypeDef => ! stat.isClassDef || stat.mods.is(ImplicitOrImplied )
Original file line number Diff line number Diff line change @@ -2778,6 +2778,8 @@ object Parsers {
27782778 }
27792779 else if (in.token == IMPORT )
27802780 stats ++= importClause(IMPORT , Import )
2781+ else if (in.token == EXPORT )
2782+ stats ++= importClause(EXPORT , Export .apply)
27812783 else if (in.token == AT || isDefIntro(modifierTokens))
27822784 stats +++= defOrDcl(in.offset, defAnnotsMods(modifierTokens))
27832785 else if (! isStatSep) {
Original file line number Diff line number Diff line change @@ -408,6 +408,7 @@ EnumCase ::= ‘case’ (id ClassConstr [‘extends’ ConstrApps]] |
408408
409409TopStatSeq ::= TopStat {semi TopStat}
410410TopStat ::= Import
411+ | Export
411412 | {Annotation [nl]} {Modifier} Def
412413 | Packaging
413414 | PackageObject
You can’t perform that action at this time.
0 commit comments