After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687142 - Unable to assign to generic delegates with missing type arguments
Unable to assign to generic delegates with missing type arguments
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Delegates
0.17.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-29 20:00 UTC by Evan Nemerson
Modified: 2018-05-22 14:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Evan Nemerson 2012-10-29 20:00:13 UTC
If you try to assign to a generic delegate without a type argument valac will emit an error:


  public delegate uint Foo<T> (T v);

  public static uint bar (string foo) {
    return GLib.str_hash (foo);
  }

  private static int main (string[] args) {
    Foo func = bar;

    return 0;
  }


wtf.vala:8.7-8.16: error: Assignment: Cannot convert from `bar' to `Foo'
  Foo func = bar;
      ^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Comment 1 GNOME Infrastructure Team 2018-05-22 14:35:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/329.