titzer / virgil

A fast and lightweight native programming language
1.24k stars 51 forks source link

Fix jvm namespace clash bug #269

Closed thelongmarch-azx closed 3 months ago

thelongmarch-azx commented 3 months ago

When the compiler emits jvm/jar target, only virgil class names are considered when creating the jvm class. This means private virgil classes in different files having the same name will lead to a jvm runtime error, especially when the signatures of their constructors are different. This PR incorporates the virgil type uid into the jvm class name, thus avoiding this name clash issue.