Skip to content

Commit 9d6036b

Browse files
authored
Merge pull request #8853 from dotty-staging/fix-#8845
Fix #8845: Strip annots from proto when checking SAM
2 parents 1f9bca3 + 349671a commit 9d6036b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4728,6 +4728,8 @@ object Types {
47284728
zeroParamClass(tp.underlying)
47294729
case tp: TypeVar =>
47304730
zeroParamClass(tp.underlying)
4731+
case tp: AnnotatedType =>
4732+
zeroParamClass(tp.underlying)
47314733
case _ =>
47324734
NoType
47334735
}

tests/pos/i8845.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
trait IntToLong:
2+
def apply(v: Int) : Long
3+
4+
inline def convert1( f: IntToLong) = ???
5+
inline def convert2(inline f: IntToLong) = ???
6+
7+
val test1 = convert1(_ * 10)
8+
val test2 = convert2(_ * 10)

0 commit comments

Comments
 (0)