question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type uninitializedThis is not assignable

See original GitHub issue

In b1801a4f. The backend explodes with:

[error] Test dotty.tools.dotc.transform.PatmatExhaustivityTest.patmatExhaustivity failed: java.lang.VerifyError: Bad type on operand stack
[error] Exception Details:
[error]   Location:
[error]     dotty/tools/dotc/reporting/TestReporter$$anon$18.<init>(Ljava/io/PrintWriter;)V @7: invokedynamic
[error]   Reason:
[error]     Type uninitializedThis (current frame, stack[1]) is not assignable to 'dotty/tools/dotc/reporting/TestReporter$$anon$18'
[error]   Current Frame:
[error]     bci: @7
[error]     flags: { flagThisUninit }
[error]     locals: { uninitializedThis, 'java/io/PrintWriter' }
[error]     stack: { uninitializedThis, uninitializedThis }
[error]   Bytecode:
[error]     0x0000000: 2a2b b500 122a 2aba 0025 0000 b200 29ba
[error]     0x0000010: 0035 0000 04b7 0038 b1                 
[error] , took 0.01 sec
[error]     at dotty.tools.dotc.reporting.TestReporter$.simplifiedReporter(TestReporter.scala:126)
[error]     at dotty.tools.dotc.transform.PatmatExhaustivityTest.compileFile(PatmatExhaustivityTest.scala:20)
[error]     at dotty.tools.dotc.transform.PatmatExhaustivityTest.$anonfun$176(PatmatExhaustivityTest.scala:74)
[error]     at scala.collection.immutable.List.map(List.scala:273)
[error]     at dotty.tools.dotc.transform.PatmatExhaustivityTest.patmatExhaustivity(PatmatExhaustivityTest.scala:75)
[error]     ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DarkDimiuscommented, Apr 10, 2017

The bug has nothing to do with backend. Lamda lift is to blame. It Moved a lambda defined in a super-call into a private method in the class containing this supercall. This makes method inaccessible in supercall.

0reactions
liufengyuncommented, Apr 10, 2017

Minimal code to reproduce the problem:

class Base(f: Int => Int) {
  f(3)
}

class Child(x: Int) extends Base(y => x + y)

object Test {
  def main(args: Array[String]): Unit = new Child(4)
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Type is not assignable to uninitializedThis" when inserting ...
The stack map's frame only contains types and if UninitializedThis is present, the flag flagThisUninit is assumed to be present, which is ...
Read more >
java.lang.VerifyError when calling this() with static final field ...
<init>()V @10: invokeinterface Reason: Type uninitializedThis (current frame, stack[2]) is not assignable to 'java/lang/Object' Current ...
Read more >
Exception thrown when running unit tests with source level 1.7
No Longer Reproducible ... <init>()V @40: aload_1 Reason: Type uninitializedThis (current frame, locals[1]) is not assignable to ...
Read more >
VerifyError: Bad type on operand stack for extension function call in ...
VerifyError : Bad type on operand stack for extension function call in secondary ... Type uninitializedThis (current frame, stack[1]) is not assignable to ......
Read more >
Having an issue with Tibco BW agent and 10.7
Type uninitializedThis (current frame, locals[15]) is not assignable to 'com/ibm/msg/client/wmq/in ternal/WMQConnection' (stack map, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found