Skip to content

Commit 9020fbc

Browse files
committed
wip 11: back to single signature
1 parent 611fd87 commit 9020fbc

File tree

11 files changed

+4
-129
lines changed

11 files changed

+4
-129
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

+1-10
Original file line numberDiff line numberDiff line change
@@ -1197,18 +1197,9 @@ class TreeUnpickler(reader: TastyReader,
11971197
makeSelect(qual, name, accessibleDenot(qualType, name, sig, target))
11981198
val res = symname match
11991199
case SignedName(name, sig, target) =>
1200-
val pre = ctx.typeAssigner.maybeSkolemizePrefix(qualType, name)
1201-
val isAmbiguous = pre.nonPrivateMember(name).match
1202-
case d: MultiDenotation =>
1203-
d.atSignature(sig, target).isInstanceOf[MultiDenotation]
1204-
case _ => false
1205-
if isAmbiguous then
1206-
makeSelect(qual, name, space.decl(name).atSignature(sig, target).asSeenFrom(pre))
1207-
else
1208-
select(name, sig, target)
1200+
select(name, sig, target)
12091201
case name =>
12101202
makeSelect(qual, name, accessibleDenot(qualType, name, Signature.NotAMethod, EmptyTermName))
1211-
// select(name, Signature.NotAMethod, EmptyTermName)
12121203
res
12131204
case REPEATED =>
12141205
val elemtpt = readTpt()

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
169169

170170
protected def handleRuntimeException(ex: RuntimeException)(using Context): Nothing = ex match {
171171
case ex: BadSignature => throw ex
172-
case _ => errorBadSignature(s"a runtime exception occurred: $ex at ${ex.getStackTrace.mkString("\n")}", Some(ex))
172+
case _ => errorBadSignature(s"a runtime exception occurred: $ex", Some(ex))
173173
}
174174

175175
def run()(using Context): Unit =

compiler/test/dotty/tools/dotc/FromTastyTests.scala

-11
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,6 @@ class FromTastyTests {
1313
import TestConfiguration._
1414
import FromTastyTests._
1515

16-
// @Test def postmpTestFromTasty: Unit = {
17-
// // Can be reproduced with
18-
// // > sbt
19-
// // > scalac -Ythrough-tasty -Ycheck:all <source>
20-
21-
// implicit val testGroup: TestGroup = TestGroup("posTestFromTasty")
22-
// compileTastyInDir(s"tests${JFile.separator}pos-tmp", defaultOptions,
23-
// fromTastyFilter = FileFilter.exclude(TestSources.posFromTastyBlacklisted)
24-
// ).checkCompile()
25-
// }
26-
2716
@Test def posTestFromTasty: Unit = {
2817
// Can be reproduced with
2918
// > sbt

tasty/src/dotty/tools/tasty/TastyFormat.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ object TastyFormat {
709709
*/
710710
def numRefs(tag: Int): Int = tag match {
711711
case VALDEF | DEFDEF | TYPEDEF | TYPEPARAM | PARAM | NAMEDARG | RETURN | BIND |
712-
SELFDEF | REFINEDtype | TERMREFin | TYPEREFin | HOLE | SELECTin => 1
712+
SELFDEF | REFINEDtype | TERMREFin | TYPEREFin | SELECTin | HOLE => 1
713713
case RENAMED | PARAMtype => 2
714714
case POLYtype | TYPELAMBDAtype | METHODtype => -1
715715
case _ => 0

tests/pos-tmp/avoid.scala

-34
This file was deleted.

tests/pos-tmp/hashsetremove.scala

-13
This file was deleted.

tests/pos-tmp/i5418.scala

-14
This file was deleted.

tests/pos-tmp/i5980.scala

-34
This file was deleted.

tests/pos-tmp/i8516.scala

-3
This file was deleted.

tests/pos-tmp/i9050.scala

-7
This file was deleted.

tests/pos/selectinalways.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class Buf[A] {
22
def append(a: A): this.type = this
3-
// def append(a: A*): this.type = this
3+
def append(a: A*): this.type = this
44
}
55

66
@main def Test = {

0 commit comments

Comments
 (0)