Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Name resolution on fully qualified names broken #365

Closed
kach opened this issue Aug 3, 2018 · 3 comments
Closed

Name resolution on fully qualified names broken #365

kach opened this issue Aug 3, 2018 · 3 comments
Assignees
Labels
Type: Bug 🐛 Something isn't working

Comments

@kach
Copy link
Contributor

kach commented Aug 3, 2018

$ ./bin/ergotop
Welcome to ERGOTOP version 0.2.0
ergo$ return ~clause.io {};
Response. ~clause.io {}
  :  {emit: Unit[], response: ~clause.io, state: Unit}?
ergo$ 
@kach kach added Type: Bug 🐛 Something isn't working Category: API and removed Category: API labels Aug 3, 2018
@kach
Copy link
Contributor Author

kach commented Aug 3, 2018

To be clear, this seems to be an issue with fully-qualified names, only. It does the right thing with non-fully-qualified names.

$ ./bin/ergotop
Welcome to ERGOTOP version 0.2.0
ergo$ return Donut {};
[CompilationError at line 1 col 7] Cannot find type with name 'Donut'
return Donut {};
       ^^^^^^^^ 

@jeromesimeon
Copy link
Member

Thanks for the report. We should add name resolution on already resolved names! Or some kind of scoping for type references.

jeromesimeon added a commit to jeromesimeon/ergo that referenced this issue Sep 29, 2018
@jeromesimeon
Copy link
Member

jeromesimeon commented Sep 29, 2018

In PR #464

$ ./bin/ergotop
Welcome to ERGOTOP version 0.4.3
ergo$ return ~clause.io {}
Compilation error (at line 1 col 7). Cannot find namespace 'clause'
return ~clause.io {}
       ^^^^^^^^^^^^^
ergo$ return Donut {}
Compilation error (at line 1 col 7). Cannot find type with name 'Donut'
return Donut {}
       ^^^^^^^^
ergo$ return Request {}
Compilation error (at line 1 col 7). Cannot find type with name 'Request'
return Request {}
       ^^^^^^^^^^
ergo$ return ~org.accordproject.cicero.runtime.Request{}
Response. ~org.accordproject.cicero.runtime.Request{} : ~org.accordproject.cicero.runtime.Request
ergo$ return ~org.foo.Request{}
Compilation error (at line 1 col 7). Cannot find namespace 'org.foo'
return ~org.foo.Request{}
       ^^^^^^^^^^^^^^^^^^
ergo$ return ~org.accordproject.cicero.runtime.Donut{}
Compilation error (at line 1 col 7). Cannot find type with name 'Donut'
return ~org.accordproject.cicero.runtime.Donut{}
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

jeromesimeon added a commit that referenced this issue Sep 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants