File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ object Types extends TypeUtils {
472
472
case tp : TypeRef =>
473
473
(tp.symbol.isClass || tp.symbol.isOpaqueAlias) && tp.symbol.is(Into )
474
474
case tp @ AppliedType (tycon, _) =>
475
- isInto || tycon.isConversionTargetType
475
+ tp. isInto || tycon.isConversionTargetType
476
476
case tp : AndOrType =>
477
477
tp.tp1.isConversionTargetType && tp.tp2.isConversionTargetType
478
478
case tp : TypeVar =>
Original file line number Diff line number Diff line change
1
+ import scala .language .experimental .into
2
+ import Conversion .into
3
+
4
+ case class Foo (x : Int )
5
+
6
+ given Conversion [Int , Foo ] = Foo (_)
7
+
8
+ def takeFoo (f : into[Foo ]) = f
9
+ inline def inlineTakeFoo (f : into[Foo ]) = f
10
+ inline def takeInlineFoo (inline f : into[Foo ]) = f
11
+
12
+ def test =
13
+ val f1 = takeFoo(1 )
14
+ val f2 = inlineTakeFoo(1 )
15
+ def x : Int = 2
16
+ val f3 = takeInlineFoo(x)
You can’t perform that action at this time.
0 commit comments