diff options
author | Jürg Billeter <j@bitron.ch> | 2010-07-03 09:28:33 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-07-03 12:47:58 +0200 |
commit | ac780b92d6b561f422e7935a8a9735464dc1540a (patch) | |
tree | afa3af4b327d86c764c516be08380e353e3afc61 /vala/valadelegatetype.vala | |
parent | a222e923b82fc00fcac1a66ca1ebab41d7165bce (diff) | |
download | vala-ac780b92d6b561f422e7935a8a9735464dc1540a.tar.gz |
Prepare support for generic delegates
Diffstat (limited to 'vala/valadelegatetype.vala')
-rw-r--r-- | vala/valadelegatetype.vala | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala index 15dc2c3dd..5e4938503 100644 --- a/vala/valadelegatetype.vala +++ b/vala/valadelegatetype.vala @@ -1,6 +1,6 @@ /* valadelegatetype.vala * - * Copyright (C) 2007-2009 Jürg Billeter + * Copyright (C) 2007-2010 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -48,6 +48,24 @@ public class Vala.DelegateType : DataType { public override string to_qualified_string (Scope? scope) { string s = delegate_symbol.get_full_name (); + + var type_args = get_type_arguments (); + if (type_args.size > 0) { + s += "<"; + bool first = true; + foreach (DataType type_arg in type_args) { + if (!first) { + s += ","; + } else { + first = false; + } + if (!type_arg.value_owned) { + s += "weak "; + } + s += type_arg.to_qualified_string (scope); + } + s += ">"; + } if (nullable) { s += "?"; } |