Skip to content

Commit 737ad14

Browse files
authored
Merge pull request #7804 from dotty-staging/fix-#7798
Fix #7798: Change ForceDegree to noBottom in inline
2 parents 4aac924 + e3597b0 commit 737ad14

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
275275
// Make sure all type arguments to the call are fully determined,
276276
// but continue if that's not achievable (or else i7459.scala would crash).
277277
for arg <- callTypeArgs do
278-
isFullyDefined(arg.tpe, ForceDegree.all)
278+
isFullyDefined(arg.tpe, ForceDegree.noBottom)
279279

280280
/** A map from parameter names of the inlineable method to references of the actual arguments.
281281
* For a type argument this is the full argument type.

tests/run/i7798.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
object Test {
2+
inline def meth[R <: Int]: R = 3.asInstanceOf[R]
3+
def main(args: Array[String]): Unit = {
4+
val t: Int = meth
5+
}
6+
}

0 commit comments

Comments
 (0)