Skip to content

Commit 5a3e3d1

Browse files
committed
Handle parameterless method calls
1 parent 683a4a1 commit 5a3e3d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class Semantic {
305305
// TODO: disallow `var x: T = _`
306306
Result(Hot, noErrors)
307307

308-
case Ident(name) =>
308+
case id @ Ident(name) if !id.symbol.is(Flags.Method) =>
309309
assert(name.isTermName, "type trees should not reach here")
310310
cases(expr.tpe, thisV, klass, expr)
311311

@@ -599,7 +599,7 @@ class Semantic {
599599
case _: MemberDef =>
600600

601601
case tree =>
602-
eval(tree, thisV, klass)
602+
errorBuffer ++= eval(tree, thisV, klass).errors
603603
}
604604

605605
Result(thisV, errorBuffer.toList)

0 commit comments

Comments
 (0)