We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3fe62ea + d275b03 commit 18b7574Copy full SHA for 18b7574
src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -773,7 +773,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
773
else FunctionClass(numVparams)
774
}
775
776
- if (samSym.exists && samSym.owner != correspondingFunctionSymbol) // don't treat Functions as SAMs
+ if (samSym.exists && tp.typeSymbol != correspondingFunctionSymbol) // don't treat Functions as SAMs
777
wildcardExtrapolation(normalize(tp memberInfo samSym))
778
else NoType
779
test/files/pos/sammy_extends_function.scala
@@ -0,0 +1,4 @@
1
+// https://github.com/scala/scala-dev/issues/206
2
+
3
+trait T extends Function1[String, String]
4
+object O { (x => x): T }
0 commit comments