-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15364 from dotty-staging/fix-15363
Fix #15363: Improve error messages for leaking of this
- Loading branch information
Showing
20 changed files
with
249 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
final class MyAsInstanceOfClass(o: MyAsInstanceOfClass) { | ||
val other: MyAsInstanceOfClass = { | ||
if (o.asInstanceOf[MyAsInstanceOfClass].oRef ne null) o // error | ||
else new MyAsInstanceOfClass(this) | ||
if (o.asInstanceOf[MyAsInstanceOfClass].oRef ne null) o | ||
else new MyAsInstanceOfClass(this) // error | ||
} | ||
val oRef = o | ||
} |
Oops, something went wrong.