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 {
1033
1033
case stat : TypeDef if stat.mods.is(Opaque ) => stat.name
1034
1034
}
1035
1035
def needsObject (stat : Tree ) = stat match {
1036
- case _ : ValDef | _ : PatDef | _ : DefDef => true
1036
+ case _ : ValDef | _ : PatDef | _ : DefDef | _ : Export => true
1037
1037
case stat : ModuleDef =>
1038
1038
stat.mods.is(ImplicitOrImplied ) || opaqueNames.contains(stat.name.stripModuleClassSuffix.toTypeName)
1039
1039
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 {
2778
2778
}
2779
2779
else if (in.token == IMPORT )
2780
2780
stats ++= importClause(IMPORT , Import )
2781
+ else if (in.token == EXPORT )
2782
+ stats ++= importClause(EXPORT , Export .apply)
2781
2783
else if (in.token == AT || isDefIntro(modifierTokens))
2782
2784
stats +++= defOrDcl(in.offset, defAnnotsMods(modifierTokens))
2783
2785
else if (! isStatSep) {
Original file line number Diff line number Diff line change @@ -408,6 +408,7 @@ EnumCase ::= ‘case’ (id ClassConstr [‘extends’ ConstrApps]] |
408
408
409
409
TopStatSeq ::= TopStat {semi TopStat}
410
410
TopStat ::= Import
411
+ | Export
411
412
| {Annotation [nl]} {Modifier} Def
412
413
| Packaging
413
414
| PackageObject
You can’t perform that action at this time.
0 commit comments