Many issues are localised to small domains of the compiler and are self-contained, here is a non-exhaustive list of such domains, and the files associated with them:
Pretty Printing of Types and Trees
Objects in the compiler that inherit from Showable can be pretty printed. The pretty-printing of objects is used in many places, from debug output, to user-facing error messages and printing of trees after each phase.
Content of Error Messages
You can find the definitions of most error messages in messages (with IDs
defined in ErrorMessageID). If the message is not defined there, try the
-Ydebug-error compiler flag, which will print a stack trace leading to the
production of the error, and the contents of the message.
Compiler Generated Given Instances
If the issue lies in given instances provided by the compiler, such as
scala.reflect.Manifest, etc, look in Synthesizer, which provides factories for
Compiler Generated Methods
Members can be generated for many classes, such as
for case classes and value classes, and
fromProduct for Mirrors.
To change the implementation, see SyntheticMembers.
For suggestions to auto-complete method selections, see Completion.
Pattern Match Exhaustivity
See the quoted runtime package.
Compiletime Ops Types
tryCompiletimeConstantFold in Types.
Contributors to this page:
- About This Guide
- Getting Started
- Contributing to Scala 3
- Reproducing an Issue
- Finding the Cause of an Issue
- Common Issue Locations
- How to Inspect Values
- Improving Your Workflow
- Testing Your Changes
- Pull Request Checklist
- High Level Architecture
- Compiler Overview
- Compiler Phases
- Compiler Types
- Time in the Compiler