hephaestus-compiler-project / hephaestus

A framework for testing compilers' type checkers
https://hephaestus-compiler-project.github.io/
GNU General Public License v3.0
49 stars 10 forks source link

Implementation errors related to Type Arguments Erasure #25

Closed StefanosChaliasos closed 3 years ago

StefanosChaliasos commented 3 years ago
class X<T>(val x: T)

fun main () {
    val a2: X<Short> = X(X(50).x) 
}
class Paroling<N>(val burying: N)

fun buxom(warned: Paroling<Short>) {}

fun main () {
    val bizarre: Short = 10
    buxom(Paroling<Short>(if (true) bizarre else Paroling(62).burying))
}

fun main () { val x: B = B(C()) // compiles val y: B = foo() // error }

StefanosChaliasos commented 3 years ago

Closes #12 #17

StefanosChaliasos commented 3 years ago

We will use a different approach for inference.