Comments (2)
This is definitely an interaction of two bugs.
- Something isn't handled right about aliases in collections, causing the function to incorrectly not be found.
- When we're creating a no such function error, we've already discarded Collection specific information. The collection names have become part of their member functions. However, in this case, we don't have a member function, which is why we're making an error. Unfortunately we don't have a list of collections either. We either need to propagate the collection names forward to have them at this error point, or we need to do some sort of fudge like checking all functions or going back to the AST in order to get Collection names at this point. Probably the first is better, but propagating the collection names through cleanly without major refactors isn't particularly trivial. I tried just adding them to the TypeMap, but TypeInfos require TypeDecls and Collections have CollectionDecls instead. That's of course changeable, but the more we change the definition of TypeInfo to accomodate this the more we risk breaking something else. It might be cleaner to just save a list in build_func_map() or extend_type_map(), and pass that through to here, but I haven't looked that through yet.
As you may infer from the above lengths, I've spent most of my time so far on issue 2. I might sit on that for a bit and go back to issue 1 for now. That's arguably more important, and probably an easier fix, although I haven't dug into it too much. I was hoping to fix issue 2 first, so that I could use issue 1 to test it, but issue 2 should be independently testable. Just something like the below should cleanly repro issue 2 regardless of issue 1 being fixed:
collection foo {
fn func(domain source) {
allow(source, self, process, signal);
}
}
domain bar {
foo.doesnt_exist();
}
from cascade.
Changed title. #198 should address directly the exact issue originally reported here.
In order to clean up the error message, and handle aliases on collections, we really need to store the list of collections and their aliases somewhere so that we can look back at them later.
from cascade.
Related Issues (20)
- Adding annotations on nested extensions doesn't work
- Drop default SIDs
- Error messages about invalid permissions refer to "type"
- Build failure based on dependencies HOT 1
- Can't call functions on arguments
- Member function not being found HOT 1
- Can object classes and permissions conditionally resolve based on context?
- Context should provide a one stop shop for symbol resolution
- Require annotation on ambiguous bindings
- FunctionInfo::symbol_to_caller_symbol() ignores permission lists
- Late annotations are being dropped
- Teach CascadeStrings about files
- Cascade is reporting no type errors on the full type.function
- collect_aliases() ignores duplicates
- Add the ability for InternalErrors to take a help string of some sort
- Support genhomedircon path substitutions
- Missing passwd object class definition in built in object classes
- Display warnings along with errors on unsuccessful complilations
- Downgrade to warnings unknown types in arguments as well
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cascade.