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.

Dotty gets confused by raw types in bytecode signatures

See original GitHub issue

Consider the following file Test.scala:

import org.testng.IAnnotationTransformer
import org.testng.annotations.ITestAnnotation
import java.lang.reflect.Method
import java.lang.reflect.Constructor

class SingleTestAnnotationTransformer(testName: String) extends IAnnotationTransformer {
  override def transform( annotation: ITestAnnotation, testClass: java.lang.Class[_], testConstructor: Constructor[_], testMethod: Method): Unit = {}
}

Running

./bin/dotc -classpath "$(coursier fetch -p org.testng:testng:6.8.7)" Test.scala 

produces the following error:

-- [E036] Reference Error: Test.scala:9:15 -------------------------
9 |  override def transform( annotation: ITestAnnotation, testClass: java.lang.Class[_], testConstructor: Constructor[_], testMethod: Method): Unit = {
  |               ^
  |               method transform overrides nothing

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
smartercommented, Oct 5, 2017
0reactions
oderskycommented, Oct 10, 2017

I plan to refactor ClassfileParser to be able to discard parts of the classfile we don’t care about (e.g the Code attributes, private methods).

That would be very helpful. We should do something similar with Tasty files which suffer the same problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Python Bytecode - Towards Data Science
The bytecode is a low-level platform-independent representation of your source code, however, it is not the binary machine code and cannot be ...
Read more >
Map raw types in Kotlin/JVM generic method signatures as ...
In Java classes compiled to JVM bytecode, such raw types are represented as raw types (e.g., Ljava/util/List; ) in generic method signatures. Current...
Read more >
Types — Solidity 0.8.17 documentation
Types . Solidity is a statically typed language, which means that the type of each variable (state and local) needs to be specified....
Read more >
Difficulty defining multiple methods with same name - Question
I have another confusing issue similar to the one reported here: function ... As a side note, type erasure is not a Scala...
Read more >
CS 419 Final Exam Study Guide
Computer security is about keeping computers, their programs, ... Buffer overflows can be avoided by using languages with stronger type checking and array ......
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