We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c974fd commit f30279fCopy full SHA for f30279f
compiler/src/dotty/tools/dotc/config/Feature.scala
@@ -68,7 +68,9 @@ object Feature:
68
69
def sourceVersion(using Context): SourceVersion =
70
if ctx.compilationUnit == null then sourceVersionSetting
71
- else ctx.compilationUnit.sourceVersion.getOrElse(sourceVersionSetting)
+ else ctx.compilationUnit.sourceVersion match
72
+ case Some(v) => v
73
+ case none => sourceVersionSetting
74
75
def migrateTo3(using Context): Boolean =
76
sourceVersion == `3.0-migration` || enabledBySetting(nme.Scala2Compat)
0 commit comments