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 @@ -1026,7 +1026,7 @@ object desugar {
1026
1026
case stat : TypeDef if stat.mods.is(Opaque ) => stat.name
1027
1027
}
1028
1028
def needsObject (stat : Tree ) = stat match {
1029
- case _ : ValDef | _ : PatDef | _ : DefDef => true
1029
+ case _ : ValDef | _ : PatDef | _ : DefDef | _ : Export => true
1030
1030
case stat : ModuleDef =>
1031
1031
stat.mods.is(ImplicitOrImplied ) || opaqueNames.contains(stat.name.stripModuleClassSuffix.toTypeName)
1032
1032
case stat : TypeDef => ! stat.isClassDef || stat.mods.is(ImplicitOrImplied )
Original file line number Diff line number Diff line change @@ -2773,6 +2773,8 @@ object Parsers {
2773
2773
}
2774
2774
else if (in.token == IMPORT )
2775
2775
stats ++= importClause(IMPORT , Import )
2776
+ else if (in.token == EXPORT )
2777
+ stats ++= importClause(EXPORT , Export .apply)
2776
2778
else if (in.token == AT || isDefIntro(modifierTokens))
2777
2779
stats +++= defOrDcl(in.offset, defAnnotsMods(modifierTokens))
2778
2780
else if (! isStatSep) {
Original file line number Diff line number Diff line change @@ -406,6 +406,7 @@ EnumCase ::= ‘case’ (id ClassConstr [‘extends’ ConstrApps]] |
406
406
407
407
TopStatSeq ::= TopStat {semi TopStat}
408
408
TopStat ::= Import
409
+ | Export
409
410
| {Annotation [nl]} {Modifier} Def
410
411
| Packaging
411
412
| PackageObject
You can’t perform that action at this time.
0 commit comments