Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

parser: cannot parse "foo.bar(quaz)" #21

Closed
@vojtajina

Description

@vojtajina
class Some {
  foo(value) {
    return value;
  }
}

scope['some'] = new Some();
_scope['val'] = true;
_scope['foo'] = (value) {
  return value;
};

dump(parse('foo(val)').getter(scope, {}));
// this will work fine and print expected true

dump(parse('some.foo(val)').getter(_scope, {}));
// this will fail with:
Uncaught exception during mirrored execution: <Compile-time error during mirrored execution: <Object does not implement the List interface> 
ORIGINAL STACKTRACE:
 #0      Injector._getInstanceBySymbol (package:di/injector.dart:91:7)
#1      Injector.getBySymbol (package:di/injector.dart:143:61)
#2      NgControllerAttrDirective.attach (package:angular/directives/ng_controller.dart:28:78)
#3      Block.attach (package:angular/block.dart:253:29)
#4      bootstrapAngular.<anonymous closure> (http://localhost:8000/demo/todo/main.dart:31:46)
>, #0      _LocalClosureMirrorImpl._apply (dart:mirrors-patch/mirrors_impl.dart:291:1)
#1      _LocalClosureMirrorImpl.apply (dart:mirrors-patch/mirrors_impl.dart:268:18)
#2      Injector.invoke (package:di/injector.dart:175:24)
#3      bootstrapAngular (http://localhost:8000/demo/todo/main.dart:30:18)
#4      main (http://localhost:8000/demo/todo/main.dart:55:19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions