Dotty gets confused by raw types in bytecode signatures
See original GitHub issueConsider 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:
- Created 6 years ago
- Comments:12 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@adriaanm Behold! https://github.com/lampepfl/dotty/blob/c50c16420b037268fe8e62bdd659e60ee2ceabfc/compiler/src/dotty/tools/dotc/core/SymDenotations.scala#L1897-L1903
My plan is in fact to see if I can use this for classfile loading too 😉
That would be very helpful. We should do something similar with Tasty files which suffer the same problem.