Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Feb 10, 2015

Review by @sjrd

Create an object Util for utility methods that are used in several places.
@odersky
Copy link
Contributor Author

odersky commented Feb 10, 2015

I accidentally slipped another change into this PR (Make line search logic in SourcePositions generally available). But that's OK. We want to do that anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second precondition should not be there, since you specify what happens if it's not true, i.e., the method must return -1. (as opposed to: it crashes or loops indefinitely)

@sjrd
Copy link
Member

sjrd commented Feb 10, 2015

That's all I have. LGTM for the commit about the mutable flag.

@odersky
Copy link
Contributor Author

odersky commented Feb 10, 2015

Thanks for the quick review!

odersky added a commit that referenced this pull request Feb 10, 2015
@odersky odersky merged commit 92013ab into scala:master Feb 10, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is prone to overflow (http://googleresearch.blogspot.com.au/2006/06/extra-extra-read-all-about-it-nearly.html).

Of course we're unlikely to deal with a source file long enough to hit the problem :)

@allanrenucci allanrenucci deleted the fix/capturedvars branch December 14, 2017 19:22
tgodzik added a commit to tgodzik/scala3 that referenced this pull request Apr 29, 2025
Backport "improvement: Support using directives in worksheets" to 3.3 LTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants