File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ class TyperState() {
162162 targetState.mergeConstraintWith(this )
163163 targetState.gc()
164164 isCommitted = true
165+ ownedVars = SimpleIdentitySet .empty
165166 }
166167
167168 /** Ensure that this constraint does not associate different TypeVars for the
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments