Skip to content

Commit d63dd11

Browse files
authored
Merge pull request #1499 from OlivierBlanvillain/fix-1335
Fix #1335: Generate null checks for extractors
2 parents 7cff6a8 + 006e233 commit d63dd11

File tree

5 files changed

+97
-88
lines changed

5 files changed

+97
-88
lines changed

src/dotty/tools/dotc/Compiler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Compiler {
2525

2626
/** Meta-ordering constraint:
2727
*
28-
* DenotTransformers that change the signature of their denotation's info must go
28+
* DenotTransformers that change the signature of their denotation's info must go
2929
* after erasure. The reason is that denotations are permanently referred to by
3030
* TermRefs which contain a signature. If the signature of a symbol would change,
3131
* all refs to it would become outdated - they could not be dereferenced in the
@@ -83,7 +83,7 @@ class Compiler {
8383
new CapturedVars, // Represent vars captured by closures as heap objects
8484
new Constructors, // Collect initialization code in primary constructors
8585
// Note: constructors changes decls in transformTemplate, no InfoTransformers should be added after it
86-
new FunctionalInterfaces,// Rewrites closures to implement @specialized types of Functions.
86+
new FunctionalInterfaces, // Rewrites closures to implement @specialized types of Functions.
8787
new GetClass), // Rewrites getClass calls on primitive types.
8888
List(new LambdaLift, // Lifts out nested functions to class scope, storing free variables in environments
8989
// Note: in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object desugar {
2727
private type VarInfo = (NameTree, Tree)
2828

2929
/** Names of methods that are added unconditionally to case classes */
30-
def isDesugaredCaseClassMethodName(name: Name)(implicit ctx: Context) =
30+
def isDesugaredCaseClassMethodName(name: Name)(implicit ctx: Context): Boolean =
3131
name == nme.isDefined ||
3232
name == nme.copy ||
3333
name == nme.productArity ||

0 commit comments

Comments
 (0)