File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -289,14 +289,15 @@ object Types {
289289 def isFromJavaObject (using Context ): Boolean = typeSymbol eq defn.FromJavaObjectSymbol
290290
291291 /** True iff `symd` is a denotation of a class type parameter and the reference
292- * `<this > . <symd>` is an actual argument reference, i.e. `this ` is different
293- * from the ThisType of `symd`'s owner.
292+ * `<pre > . <symd>` is an actual argument reference, i.e. `pre ` is not the
293+ * ThisType of `symd`'s owner, or a reference to `symd`'s owner.'
294294 */
295295 def isArgPrefixOf (symd : SymDenotation )(using Context ): Boolean =
296296 symd.exists && ! symd.owner.is(Package ) && // Early exit if possible because the next check would force SymbolLoaders
297297 symd.isAllOf(ClassTypeParam ) && {
298298 this match {
299299 case tp : ThisType => tp.cls ne symd.owner
300+ case tp : TypeRef => tp.symbol ne symd.owner
300301 case _ => true
301302 }
302303 }
@@ -2212,7 +2213,8 @@ object Types {
22122213 throw new TypeError (
22132214 i """ bad parameter reference $this at ${ctx.phase}
22142215 |the parameter is ${param.showLocated} but the prefix $prefix
2215- |does not define any corresponding arguments. """ )
2216+ |does not define any corresponding arguments.
2217+ |idx = $idx, args = $args""" )
22162218 NoDenotation
22172219 }
22182220 }
Original file line number Diff line number Diff line change 1+ object data {
2+
3+ trait OfType [T ]
4+ case object IntT extends OfType [Int ]
5+ case object DoubleT extends OfType [Double ]
6+ case object FloatT extends OfType [Float ]
7+
8+ type DSeq [X ] = scala.collection.immutable.AbstractSeq [X ]
9+
10+ case class ColumnName [T ](n: String , t : OfType [T ])
11+ case class Column [T ,F [_]<: DSeq [_]](n: F [T ], of : ColumnName [T ])
12+ }
13+
14+ def min4 [T ,F [_]<: data.DSeq [T ]](col : data.Column [T ,F ])(using Ordering [T ]): T = {
15+ col match {
16+ case c: data.Column [Int ,_] => c.n.min[T ](Ordering [T ])
17+ case _:data.Column [Double ,_] => ???
18+ case _:data.Column [Float ,_] => ???
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments