File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
compiler/src/dotty/tools/dotc/core
tests/pos-custom-args/captures Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1872,7 +1872,10 @@ object Types {
1872
1872
def dropRepeatedAnnot (using Context ): Type = dropAnnot(defn.RepeatedAnnot )
1873
1873
1874
1874
def annotatedToRepeated (using Context ): Type = this match {
1875
- case tp @ ExprType (tp1) => tp.derivedExprType(tp1.annotatedToRepeated)
1875
+ case tp @ ExprType (tp1) =>
1876
+ tp.derivedExprType(tp1.annotatedToRepeated)
1877
+ case self @ AnnotatedType (tp, annot) if annot matches defn.RetainsByNameAnnot =>
1878
+ self.derivedAnnotatedType(tp.annotatedToRepeated, annot)
1876
1879
case AnnotatedType (tp, annot) if annot matches defn.RepeatedAnnot =>
1877
1880
val typeSym = tp.typeSymbol.asClass
1878
1881
assert(typeSym == defn.SeqClass || typeSym == defn.ArrayClass )
Original file line number Diff line number Diff line change
1
+ def typeMismatch (addenda : => String * ) = ???
2
+ class TypeMismatch (addenda : => String * )
3
+
4
+ def test =
5
+ typeMismatch(" foo" )
6
+ typeMismatch(" foo" , " bar" )
7
+ TypeMismatch (" foo" )
8
+ TypeMismatch (" foo" , " bar" )
9
+
You can’t perform that action at this time.
0 commit comments