2

Comment in the source for the Predef states:

The Predef object provides definitions that are accessible in all Scala compilation units without explicit qualification.

How is Predefs inherited in Scala?

1 Answer 1

4

The compiler implicitly adds import _root_.scala.Predef._ to every source file.

Sign up to request clarification or add additional context in comments.

1 Comment

And there are options to turn it off, -Yno-predef -Yno-imports and a WIP to let you set what is imported (possibly -Ypredef).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.