Commit 74721858 authored by Luca Bruno's avatar Luca Bruno

codegen: Reintroduce memory leak when using generics in interfaces

The bug was present in older Vala versions. Reintroducing it to avoid
breaking old code, until a proper fix is found.

See bug 666480.
parent 516e73a9
......@@ -3101,7 +3101,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
if (type.type_parameter != null) {
var parent = type.type_parameter.parent_symbol;
var cl = parent as Class;
if ((!(parent is Method) && !(parent is ObjectTypeSymbol)) || (cl != null && cl.is_compact)) {
if ((!(parent is Method) && !(parent is ObjectTypeSymbol)) || (cl != null && cl.is_compact) || parent is Interface) {
return new CCodeConstant ("NULL");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment