Skip to content

Commit 621d11c

Browse files
authored
Merge pull request #1869 from dotty-staging/fix-#1868
Fix #1868: Fix a logic error in a match
2 parents 64b8931 + 7a5f271 commit 621d11c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
11501150
// classes defined in a such arguments should not be entered into the
11511151
// enclosing class.
11521152
c.exprContext(mdef, exprOwner)
1153-
case None => c
1153+
case _ => c
11541154
}
11551155
}
11561156
// necessary in order to mark the typed ahead annotations as definitely typed:

tests/pos/i1868.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Test[X](x: X) {
2+
def checkSpecialization[Y](y: Y): X = {
3+
def specMe[@specialized T]() = ()
4+
x
5+
}
6+
private def checkNameStartsWith(prefix: String) = { (new Exception) }
7+
}

0 commit comments

Comments
 (0)