google / google/reflectable.dart

Unsupported operation: location

Open
#309 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
386
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hi! Very nice work on this library. Unfortunately it looks like it is not able to get the source code location of classes in the same library.

Example Reflector code:

```
class Reflector extends Reflectable {

const Reflector() : super(typeCapability, typingCapability);

}

const reflector = Reflector();

@reflector
class Solver {
...
}
```

Code crashing with error `Unsupported operation: location`:
```
TypeMirror aMirror = reflector.reflectType(Solver);
var srcUri = aMirror.location.sourceUri;
```

As both Reflector and `Solver` class are in the same library, I would expect it to be able to get the source code location of the `Solver` class.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.