Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ object Types extends TypeUtils {
case tp: TypeRef =>
(tp.symbol.isClass || tp.symbol.isOpaqueAlias) && tp.symbol.is(Into)
case tp @ AppliedType(tycon, _) =>
isInto || tycon.isConversionTargetType
tp.isInto || tycon.isConversionTargetType
case tp: AndOrType =>
tp.tp1.isConversionTargetType && tp.tp2.isConversionTargetType
case tp: TypeVar =>
Expand Down
16 changes: 16 additions & 0 deletions tests/pos/i23398.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//> using options -feature -Werror
import scala.language.experimental.into
import Conversion.into

case class Foo(x: Int)

given Conversion[Int, Foo] = Foo(_)

def takeFoo(f: into[Foo]) = f
inline def inlineTakeFoo(f: into[Foo]) = f
inline def takeInlineFoo(inline f: into[Foo]) = f

def test =
val f1 = takeFoo(1)
val f2 = inlineTakeFoo(1)
val f3 = takeInlineFoo(1)