diff options
Diffstat (limited to 'sources/scalac/transformer/matching/PatternMatcher.java')
-rw-r--r-- | sources/scalac/transformer/matching/PatternMatcher.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/scalac/transformer/matching/PatternMatcher.java b/sources/scalac/transformer/matching/PatternMatcher.java index 47b7ca67ef..21d5b1a595 100644 --- a/sources/scalac/transformer/matching/PatternMatcher.java +++ b/sources/scalac/transformer/matching/PatternMatcher.java @@ -784,7 +784,9 @@ public class PatternMatcher extends PatternTool { Modifiers.MUTABLE, resultVar.name, gen.mkType(selector.pos, typeOf(resultVar)), - Tree.Empty).setType(defs.UNIT_TYPE).setSymbol(resultVar)); + gen.mkDefaultValue(selector.pos, typeOf(resultVar))) + .setType(defs.UNIT_TYPE) + .setSymbol(resultVar)); ts.append( make.If( selector.pos, |