Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #595 from 9rnsr/fix7190
Issue 7190 - Tuple length incorrect
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
test/compilable/extra-files/example7190/controllers/HomeController.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module example7190.controllers.HomeController; | ||
|
||
import serenity7190.core.Controller; | ||
|
||
class HomeController : Controller { | ||
mixin register!(HomeController); | ||
} |
11 changes: 11 additions & 0 deletions
11
test/compilable/extra-files/example7190/models/HomeModel.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module example7190.models.HomeModel; | ||
|
||
import serenity7190.core.Model; | ||
|
||
struct Article { | ||
ulong id; | ||
} | ||
|
||
class HomeModel : Model { | ||
private SqlitePersister!Article mArticles; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Controller { | ||
mixin template register(T : Controller) { | ||
enum _s_pkg = __traits(parent, __traits(parent, __traits(parent, T))).stringof["package ".length .. $]; | ||
|
||
enum _s_model = T.stringof[0 .. $-`Controller`.length] ~ `Model`; | ||
mixin(q{enum _ = is(} ~ _s_pkg ~ q{.models.} ~ _s_model ~ q{.} ~ _s_model ~ q{ : serenity7190.core.Model.Model);}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class SqlitePersister(T) { | ||
static assert(T.tupleof.length > 0, T.stringof ~ `(` ~ (T.tupleof.length + '0') ~ `): ` ~ T.tupleof.stringof); | ||
} | ||
|
||
class Model {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -c -Icompilable/extra-files | ||
|
||
import example7190.controllers.HomeController; | ||
import example7190.models.HomeModel; | ||
|
||
void main(){} |