diff options
Diffstat (limited to '')
| -rw-r--r-- | spec/inputs/class.moon | 3 | ||||
| -rw-r--r-- | src/MoonP/moon_compiler.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/spec/inputs/class.moon b/spec/inputs/class.moon index 533694e..ca8b58c 100644 --- a/spec/inputs/class.moon +++ b/spec/inputs/class.moon | |||
| @@ -226,4 +226,7 @@ do | |||
| 226 | test = Test! | 226 | test = Test! |
| 227 | test\test! | 227 | test\test! |
| 228 | 228 | ||
| 229 | class extends lapis.Application | ||
| 230 | "/": => json: { status: true } | ||
| 231 | |||
| 229 | nil | 232 | nil |
diff --git a/src/MoonP/moon_compiler.cpp b/src/MoonP/moon_compiler.cpp index 1d9161b..271bc06 100644 --- a/src/MoonP/moon_compiler.cpp +++ b/src/MoonP/moon_compiler.cpp | |||
| @@ -49,7 +49,7 @@ inline std::string s(std::string_view sv) { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | const std::string_view version() { | 51 | const std::string_view version() { |
| 52 | return "0.4.5"sv; | 52 | return "0.4.6"sv; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | // name of table stored in lua registry | 55 | // name of table stored in lua registry |
| @@ -4117,7 +4117,7 @@ private: | |||
| 4117 | if (!className.empty()) { | 4117 | if (!className.empty()) { |
| 4118 | _buf << ","sv << nll(classDecl) << indent(1) << "__name = "sv << className << (extend ? s(","sv) : Empty) << nll(classDecl); | 4118 | _buf << ","sv << nll(classDecl) << indent(1) << "__name = "sv << className << (extend ? s(","sv) : Empty) << nll(classDecl); |
| 4119 | } else { | 4119 | } else { |
| 4120 | _buf << nll(classDecl); | 4120 | _buf << (extend ? s(","sv) : Empty) << nll(classDecl); |
| 4121 | } | 4121 | } |
| 4122 | if (extend) { | 4122 | if (extend) { |
| 4123 | _buf << indent(1) << "__parent = "sv << parentVar << nll(classDecl); | 4123 | _buf << indent(1) << "__parent = "sv << parentVar << nll(classDecl); |
