-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize how previously experimental features are handled #21686
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,11 @@ enum SourceVersion: | |
|
||
def isAtMost(v: SourceVersion) = stable.ordinal <= v.ordinal | ||
|
||
def enablesFewerBraces = isAtLeast(`3.3`) | ||
def enablesClauseInterleaving = isAtLeast(`3.6`) | ||
def enablesNewGivens = isAtLeast(`3.6`) | ||
def enablesNamedTuples = isAtLeast(`3.6`) | ||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see where these two functions are used so far There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
object SourceVersion extends Property.Key[SourceVersion]: | ||
def defaultSourceVersion = `3.6` | ||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can actually drop this test, it's purpose was to check that we require the import when the source is < 3.6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//> using options --source 3.5 | ||
|
||
import scala.language.experimental.clauseInterleaving | ||
//> using options --source 3.6 | ||
|
||
def ba[A](x: A)[B](using B): B = summon[B] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not drop this one too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove
namedTuples
in line 36 too.