Skip to content

Commit 57af76c

Browse files
committed
Merge branch 'master' of https://github.com/lampepfl/dotty into fix_deprecation
2 parents f8f1a5c + 3e2b2cf commit 57af76c

File tree

126 files changed

+1125
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+1125
-193
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Dotty
22
=====
33
[![Dotty CI](https://github.com/lampepfl/dotty/workflows/Dotty/badge.svg?branch=master)](https://github.com/lampepfl/dotty/actions?query=branch%3Amaster)
4-
[![Join the chat at https://gitter.im/scala/scala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/scala/scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
[![Join the chat at https://discord.com/invite/scala](https://img.shields.io/discord/632150470000902164)](https://img.shields.io/discord/632150470000902164)
55

66
* [Homepage](https://dotty.epfl.ch)
77
* [Documentation](https://dotty.epfl.ch/docs)
@@ -18,7 +18,7 @@ Building a Local Distribution
1818
Code of Conduct
1919
===============
2020
Dotty uses the [Scala Code of Conduct](https://www.scala-lang.org/conduct.html)
21-
for all communication and discussion. This includes both GitHub, Gitter chat and
21+
for all communication and discussion. This includes both GitHub, Discord and
2222
other more direct lines of communication such as email.
2323

2424
How to Contribute

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ final case class SbtCommunityProject(
140140
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
141141
case _ => Nil
142142
extraSbtArgs ++ sbtProps ++ List(
143-
"-sbt-version", "1.5.7",
143+
"-sbt-version", "1.6.1",
144144
"-Dsbt.supershell=false",
145145
s"-Ddotty.communitybuild.dir=$communitybuildDir",
146146
s"--addPluginSbtFile=$sbtPluginFilePath"

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,15 @@ object TypeErasure {
524524
case tp: OrType => hasStableErasure(tp.tp1) && hasStableErasure(tp.tp2)
525525
case _ => false
526526
}
527+
528+
/** The erasure of `PolyFunction { def apply: $applyInfo }` */
529+
def erasePolyFunctionApply(applyInfo: Type)(using Context): Type =
530+
assert(applyInfo.isInstanceOf[PolyType])
531+
val res = applyInfo.resultType
532+
val paramss = res.paramNamess
533+
assert(paramss.length == 1)
534+
erasure(defn.FunctionType(paramss.head.length,
535+
isContextual = res.isImplicitMethod, isErased = res.isErasedMethod))
527536
}
528537

529538
import TypeErasure._
@@ -597,11 +606,7 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
597606
case ExprType(rt) =>
598607
defn.FunctionType(0)
599608
case RefinedType(parent, nme.apply, refinedInfo) if parent.typeSymbol eq defn.PolyFunctionClass =>
600-
assert(refinedInfo.isInstanceOf[PolyType])
601-
val res = refinedInfo.resultType
602-
val paramss = res.paramNamess
603-
assert(paramss.length == 1)
604-
this(defn.FunctionType(paramss.head.length, isContextual = res.isImplicitMethod, isErased = res.isErasedMethod))
609+
erasePolyFunctionApply(refinedInfo)
605610
case tp: TypeProxy =>
606611
this(tp.underlying)
607612
case tp @ AndType(tp1, tp2) =>

0 commit comments

Comments
 (0)