Comments (6)
We may store them like [TypeName: Type]
, but I'm not sure we will get something from storing actual type references, because what we need is just to check if the type name is inside the implementing types collection and not to access the metadata of those types. At least I don't see it useful right now.
from sourcery.
I'll add it
from sourcery.
This will be needed for the following to work properly:
protocol AutoEquatable {}
struct AStruct: Equatable {
public static func == (l: AStruct, r: AStruct) -> Bool {
return true
}
}
struct Book: AutoEquatable {
let aStruct: AStruct
}
Given template like
{% for type in types.implementing.AutoEquatable %}
{% for variable in type.storedVariables %}
{% if variable.type.inheritedTypes.AutoEquatable %}
{{ variable.type }}
{% endif %}
{% endfor %}
{% endfor %}
It should not generate code
from sourcery.
Ah, so if inheritedTypes
is just an array of strings we can not use it in if type.inheritedTypes.SomeType
? Then looks like those collections should be "dummy" dictionaries like ["TypeName": "TypeName"]
?
from sourcery.
well right now we don't store real types in inheritedTypes, and I think we want to because with flattening types it will be much more reliable right?
from sourcery.
Implemneted in 0.4.1
from sourcery.
Related Issues (20)
- running sorcery in buildtool plugin on multiple packages within a project results in error HOT 6
- Properties with types conforming to a protocol not detected HOT 3
- Auto mock template with opaque types HOT 1
- Add artifactBundle to release process HOT 4
- generate mock for UI Testing Bundle
- Generating mocks for protocols exposed from a Swift Package HOT 5
- Enum with rawValue parses comment HOT 2
- How to use `trimEnabled` with Stencil Template? HOT 1
- Sourcery does not see files during generation and linking to the project HOT 3
- Iterate Static Arrays HOT 1
- Extracting generic type name from an extension HOT 1
- Reference next value in stencil template loop
- AutoMockable: Ability to skip duplicate mocks creation while scanning external module sources HOT 2
- Sourcery crashes on \r\n (a.k.a. DOS- or Windows-style) line-endings HOT 1
- Failed to link file HOT 2
- [Question] Using Sourcery In Swift Package Executable HOT 4
- Errors when running unit tests HOT 2
- Get protocols that are implemented by the Element type of an array
- Some unit tests are executed for too long HOT 4
- Not able to build GraphQL target - Command PhaseScriptExecution failed with a nonzero exit code HOT 2
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 sourcery.