We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 427d313 + a040cc6 commit f819617Copy full SHA for f819617
compiler/src/dotty/tools/dotc/core/TyperState.scala
@@ -162,6 +162,7 @@ class TyperState() {
162
targetState.mergeConstraintWith(this)
163
targetState.gc()
164
isCommitted = true
165
+ ownedVars = SimpleIdentitySet.empty
166
}
167
168
/** Ensure that this constraint does not associate different TypeVars for the
tests/neg/i13407.scala
@@ -0,0 +1,19 @@
1
+import scala.quoted.Type
2
+
3
+trait Tensor[S <: Tuple] {
4
+ def sum[Axis <: Shape: Type](axis: Axis): Tensor[S] = { // error
5
+ Tensor.mk
6
+ }
7
+}
8
9
+object Tensor {
10
+ def mk[S <: Tuple]: Tensor[S] = new Tensor {}
11
12
13
+object Foo {
14
+ val t1: Tensor[("batch", "len", "embed")] = Tensor.mk
15
+ def foo(x: Any) = {
16
17
18
+ foo(foo(t1.sum("len"))) // error
19
0 commit comments