Skip to content

Commit 0cd54fb

Browse files
bugfix: Fix adjust type when already exists vol2
1 parent e8aee47 commit 0cd54fb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

presentation-compiler/src/main/dotty/tools/pc/InferredTypeProvider.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ final class InferredTypeProvider(
182182
typeNameEdit ::: imports
183183

184184
rhs match
185-
case t: Tree[?]
186-
if !tpt.sourcePos.span.isZeroExtent =>
185+
case t: Tree[?] if !tpt.sourcePos.span.isZeroExtent =>
187186
inferredTypeEdits(
188187
Some(
189188
AdjustTypeOpts(
@@ -223,8 +222,7 @@ final class InferredTypeProvider(
223222
while i >= 0 && sourceText(i) != ':' do i -= 1
224223
i
225224
rhs match
226-
case t: Tree[?]
227-
if !tpt.sourcePos.span.isZeroExtent =>
225+
case t: Tree[?] if !tpt.sourcePos.span.isZeroExtent =>
228226
inferredTypeEdits(
229227
Some(
230228
AdjustTypeOpts(

0 commit comments

Comments
 (0)