Is there a way to attach a small zip? If not here are my steps:
Create new macOS Project
Download AgileDB
Create new Physical Folder in IDE… name it AgileDB
Copy the files from downloaded AgileDB Sources into new physical folder in Finder
Drag files in new physical folder onto Fire project AgileDB folder so they’re in project
Compile
Not for me. it looks like it just gives up on the first one,
writeLn("The magic happens here.")
func test1(a: [Double].Type) { // E374 comma or closing parenthesis expected, got dot
// E504 Semicolon (;) required to separate two statements on the same line
// E477 Declaration expected
// E51 Implementation for method "method test1 a(a: not nullable array of Double)" is missing
}
func test2(a: [Int].Type) {
}
The encoder and decoder classes make use of several .Type parameters. This is for custom encoding/decoding. I would recommend whomever works on this bug use the AgileDB package as a way of testing.
FTR, We’re working on making the compiler understand .Type and .Protocol, but note that on all our current object platforms (Cocoa, Island, .NET and Java), meta classes are generated “on demand” by our compiler, and cannot be created for types outside of the current project (unless that project turned them on) or for code generated by other compilers. They also are not supported for protocols.
So, this will happen:
public class Foo {
}
var x: Foo.Type // will work
var y: Int.Type // will fail with "meta class not available for external type Int"
var z: IFoo.Protocol // will fail with a clean error "meta class not supported for protocols"
As such, your test case project will never compile as is, against current platforms. But really those parameters are useless anyways. Structs can’t be inherited, so a parameter of type [Int].Type will always receive the same value. it’s a useless parameter, IDK what’s tried to be comp;iished by that code.
Once we support Swift ABI object model, in expect meta classes for external Swift types will be accessible, ie SwiftUI.View.Type.
Essentially “.Type” will work same as “class of” does in Oxygene, with the same limitations.