Skip to content

Commit 64aee9d

Browse files
committed
Ignore best effort compilation failure; add some more controversial
examples; Hide more implementation parts under modularity
1 parent a23b628 commit 64aee9d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Diff for: compiler/src/dotty/tools/dotc/typer/Typer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -3518,7 +3518,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
35183518
def typedUnnamed(tree: untpd.Tree): Tree = tree match {
35193519
case tree: untpd.Apply =>
35203520
if (ctx.mode is Mode.Pattern) typedUnApply(tree, pt)
3521-
else if (ctx.mode.is(Mode.Type) && !ctx.isAfterTyper) typedAppliedConstructorType(tree)
3521+
else if (Feature.enabled(modularity) && ctx.mode.is(Mode.Type) && !ctx.isAfterTyper) typedAppliedConstructorType(tree)
35223522
else typedApply(tree, pt)
35233523
case tree: untpd.This => typedThis(tree)
35243524
case tree: untpd.Number => typedNumber(tree, pt)

Diff for: compiler/test/dotc/neg-best-effort-unpickling.excludelist

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ i18750.scala
1818

1919
# Crash on invalid prefix ([A] =>> Int)
2020
i22357a.scala
21+
22+
# `110 (of class java.lang.Integer)`
23+
context-function-syntax.scala

Diff for: tests/pos/applied_constructor_types.scala

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class Person(val name: String, tracked val age: Int)
1212
class PersonPrime(val name: String)(tracked val age: Int)
1313
class PersonBis(tracked val name: String)(val age: Int)
1414

15+
class Generic[A](val a: A)
16+
1517
object O:
1618
val m: Int = 27
1719

@@ -46,4 +48,8 @@ object Test extends App {
4648
val personBis: PersonBis("Kasia")(27) = PersonBis("Kasia")(27)
4749
val personBis1: PersonBis("Kasia")(n) = PersonBis("Kasia")(n)
4850
val personBis2: PersonBis("Kasia")(O.m) = PersonBis("Kasia")(O.m)
51+
52+
val generic1: Generic(compiletime.erasedValue[Int]) = Generic(42)
53+
val generic2: Generic(??? : Int) = Generic(42)
54+
val generic3: Generic(43) = Generic(42)
4955
}

0 commit comments

Comments
 (0)