Skip to content

Commit

Permalink
Add missing typeInfo binding
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Feb 6, 2023
1 parent 11fdff4 commit d386e8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/sourceB.yk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ pkg chaos {
class Foo[T <: str](a: i32, b: T)

fn test() {
let a = new chaos::Foo[i32](1, 1f32)
let a = new java::util::ArrayList[str]()
}
}
5 changes: 4 additions & 1 deletion src/main/kotlin/org/yakou/lang/bind/ClassMember.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ sealed class ClassMember(val memberType: MemberType) : Symbol() {
constructor.declaringClass.typeName.split('.').last().replace("$", "::"),
constructor.parameterTypes.map(TypeInfo.Companion::fromClass),
)

val ownerType = TypeInfo.fromClass(constructor.declaringClass) as TypeInfo.Class

ctor.ownerTypeInfo = TypeInfo.fromClass(constructor.declaringClass) as TypeInfo.Class
ctor.typeInfo = ownerType
ctor.ownerTypeInfo = ownerType

return ctor
}
Expand Down

0 comments on commit d386e8f

Please sign in to comment.