We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 683a4a1 commit 5a3e3d1Copy full SHA for 5a3e3d1
compiler/src/dotty/tools/dotc/transform/init/Semantic.scala
@@ -305,7 +305,7 @@ class Semantic {
305
// TODO: disallow `var x: T = _`
306
Result(Hot, noErrors)
307
308
- case Ident(name) =>
+ case id @ Ident(name) if !id.symbol.is(Flags.Method) =>
309
assert(name.isTermName, "type trees should not reach here")
310
cases(expr.tpe, thisV, klass, expr)
311
@@ -599,7 +599,7 @@ class Semantic {
599
case _: MemberDef =>
600
601
case tree =>
602
- eval(tree, thisV, klass)
+ errorBuffer ++= eval(tree, thisV, klass).errors
603
}
604
605
Result(thisV, errorBuffer.toList)
0 commit comments