diff --git a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala index 0086680d69e2..0d3deb3c7100 100644 --- a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala +++ b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala @@ -276,7 +276,7 @@ object GenericSignatures { case _ => val etp = erasure(tp) if (etp eq tp) throw new UnknownSig - else jsig(etp) + else jsig(etp, toplevel, primitiveOK) } } val throwsArgs = sym0.annotations flatMap ThrownException.unapply diff --git a/tests/pos/i3956.scala b/tests/pos/i3956.scala new file mode 100644 index 000000000000..c273fc878053 --- /dev/null +++ b/tests/pos/i3956.scala @@ -0,0 +1,4 @@ +object Foo { + type RInt = Int { val x: Int } + def f(xs: List[Int]): List[RInt] = ??? +} \ No newline at end of file