Skip to content

Generic Maps not working with abstracts #88

@haath

Description

@haath
// this works
var x: Array<Int>;

// this works
var y: MyArray<Int>;

// this does NOT work
var z: MyMap<Int>;

where

abstract MyArray<T>(Array<T>) { ... }
abstract MyMap<T>(Map<Int, T>) { ... }

Specifically the following error is thrown (once for every offending type):

Type not found : T

/haxelib/json2object/3,11,0/src/json2object/reader/DataBuilder.hx:961: lines 961-984 : ... Defined in this class

I'm assuming this is not intended since generic-array-abstracts work, but generic-map-abstracts don't?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions