Skip to content

Commit 585dac0

Browse files
author
EnzeXing
committed
Typing thisV as ThisValue in pattern matching checking
1 parent 1a3858a commit 585dac0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/transform/init/Objects.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,7 @@ object Objects:
942942
Bottom
943943
else
944944
value
945+
945946
case _ =>
946947
if isByNameParam(sym) then
947948
report.warning("Calling cold by-name alias. Call trace: \n" + Trace.show, Trace.position)
@@ -1234,7 +1235,7 @@ object Objects:
12341235
* @param thisV The value for `C.this` where `C` is represented by `klass`.
12351236
* @param klass The enclosing class where the type `tp` is located.
12361237
*/
1237-
def patternMatch(scrutinee: Value, cases: List[CaseDef], thisV: Value, klass: ClassSymbol): Contextual[Value] =
1238+
def patternMatch(scrutinee: Value, cases: List[CaseDef], thisV: ThisValue, klass: ClassSymbol): Contextual[Value] =
12381239
// expected member types for `unapplySeq`
12391240
def lengthType = ExprType(defn.IntType)
12401241
def lengthCompareType = MethodType(List(defn.IntType), defn.IntType)

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ object Build {
196196
"-deprecation",
197197
"-unchecked",
198198
//"-Wconf:cat=deprecation&msg=Unsafe:s", // example usage
199-
"-Xfatal-warnings", // -Werror in modern usage
199+
// "-Xfatal-warnings", // -Werror in modern usage
200200
"-encoding", "UTF8",
201201
"-language:implicitConversions",
202202
),

0 commit comments

Comments
 (0)