Skip to content

Commit

Permalink
Fix rebase breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Nov 22, 2024
1 parent 8c583b8 commit 508bdbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/cc/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,11 @@ class Setup extends PreRecheck, SymTransformer, SetupAPI:
if ann.symbol.isRetains then
val parent2 = stripImpliedCaptureSet(parent1)
if !tptToCheck.isEmpty then
checkWellformedLater(parent2, ann.tree, tpt)
checkWellformedLater(parent2, ann.tree, tptToCheck)
try
CapturingType(parent2, ann.tree.toCaptureSet)
catch case ex: IllegalCaptureRef =>
report.error(em"Illegal capture reference: ${ex.getMessage.nn}", tptToCheck.fold(NoSourcePosition)(_.srcPos))
report.error(em"Illegal capture reference: ${ex.getMessage.nn}", tptToCheck.srcPos)
parent2
else
t.derivedAnnotatedType(parent1, ann)
Expand Down
4 changes: 2 additions & 2 deletions tests/neg-custom-args/captures/use-capset.check
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/use-capset.scala:15:50 -----------------------------------
15 | val _: () -> List[Object^{io}] -> Object^{io} = h2 // error, should be ->{io}
| ^^
| Found: (h2 : () ->? (x$0: List[box Object^{io}]^{}) ->{io} Object^{io})
| Required: () -> List[box Object^{io}] -> Object^{io}
| Found: (h2 : () ->? (x$0: List[box Object^]^{}) ->{io} Object^{io})
| Required: () -> List[box Object^{io}] -> Object^{io}
|
| longer explanation available when compiling with `-explain`

0 comments on commit 508bdbf

Please sign in to comment.