Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getField/setField are really invokeGetter/invokeSetter #7866

Closed
gbracha opened this issue Jan 11, 2013 · 3 comments
Closed

getField/setField are really invokeGetter/invokeSetter #7866

gbracha opened this issue Jan 11, 2013 · 3 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-mirrors P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@gbracha
Copy link
Contributor

gbracha commented Jan 11, 2013

The current getField and setField implementations in the Mirror library invoke a getter or a setter rather than accessing the specified field. They should be renamed to invokeGetter and invokeSetter.

@lrhn
Copy link
Member

lrhn commented Jan 15, 2013

Added Library-Mirrors label.

@DartBot
Copy link

DartBot commented Apr 25, 2014

This comment was originally written by @Andersmholmgren


For me the name is confusing because you can also pass a symbol for a method and it returns a closure mirror, which is what i wanted but getField is not a great name in that case. Maybe getMember or something would be better.

My test program

import 'dart:mirrors';

class Foo {
  final int blah;
  Foo(this.blah);

  void fum() {}
}

main() {
  final foo = new Foo(6);
  final fm = reflect(foo);
  final fumm = fm.getField(#fum);
  final ffm = reflect(foo.fum);
}

@gbracha gbracha added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-mirrors labels Apr 25, 2014
@gbracha gbracha self-assigned this Apr 25, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed accepted labels Feb 29, 2016
@zanderso zanderso added type-enhancement A request for a change that isn't a bug and removed type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jan 5, 2017
@rmacnak-google
Copy link
Contributor

Given we don't plan to add a proper getField and setField (#7867), we won't do the breaking renaming the existing getField and setField.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-mirrors P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants