Skip to content

Commit 2476cb4

Browse files
authored
Merge pull request #3957 from gsps/fix-#3956
Fix #3956 -- Generic signature should box primitive type underlying refinement
2 parents 01f3094 + 63d65f1 commit 2476cb4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ object GenericSignatures {
281281
case _ =>
282282
val etp = erasure(tp)
283283
if (etp eq tp) throw new UnknownSig
284-
else jsig(etp)
284+
else jsig(etp, toplevel, primitiveOK)
285285
}
286286
}
287287
val throwsArgs = sym0.annotations flatMap ThrownException.unapply

tests/pos/i3956.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Foo {
2+
type RInt = Int { val x: Int }
3+
def f(xs: List[Int]): List[RInt] = ???
4+
}

0 commit comments

Comments
 (0)