Skip to content

Metadata does not accept runtimeType literals #11857

Description

@rmacnak-google

Runtime type literals are const and should be accepted.

import 'dart:mirrors';
@object
class C {}
main(){
 reflectClass(C).metadata; //Fails
}

import 'dart:mirrors';
const foo = Object;
@foo
class C {}
main(){
 reflectClass(C).metadata; //Works
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.closed-as-intendedClosed as the reported issue is expected behavior

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions