File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3291,7 +3291,7 @@ object Parsers {
3291
3291
* | SimplePattern1 [TypeArgs] [ArgumentPatterns]
3292
3292
* | ‘given’ RefinedType
3293
3293
* SimplePattern1 ::= SimpleRef
3294
- * | SimplePattern1 `.' id
3294
+ * | [ SimplePattern1] `.' id
3295
3295
* PatVar ::= id
3296
3296
* | `_'
3297
3297
*/
@@ -3308,6 +3308,9 @@ object Parsers {
3308
3308
simpleExpr(Location .InPattern )
3309
3309
case XMLSTART =>
3310
3310
xmlLiteralPattern()
3311
+ case DOT =>
3312
+ accept(DOT )
3313
+ simplePatternRest(selector(EmptyTree ))
3311
3314
case GIVEN =>
3312
3315
atSpan(in.offset) {
3313
3316
val givenMod = atSpan(in.skipToken())(Mod .Given ())
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ enum Opt[+T]:
2
2
case none extends Opt [Nothing ]
3
3
case some[T ](value : T ) extends Opt [T ]
4
4
5
+ def map [U ](f : T => U ): Opt [U ] = this match
6
+ case .none => .none
7
+ case Opt .some(v) => .some(f(v)) // TODO: This should be `case .some(v) => .some(f(v))`
8
+ end map
9
+
5
10
object Proxy :
6
11
def opt (o : Opt [Int ]): Opt [Int ] = o
7
12
You can’t perform that action at this time.
0 commit comments