Skip to content

Support shorthand property assignment in object literals#183

Merged
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
gakada:ShorthandPropertyAssignment
Aug 26, 2018
Merged

Support shorthand property assignment in object literals#183
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
gakada:ShorthandPropertyAssignment

Conversation

@gakada
Copy link
Copy Markdown
Contributor

@gakada gakada commented Aug 26, 2018

No description provided.

@Perryvw
Copy link
Copy Markdown
Member

Perryvw commented Aug 26, 2018

Can you provide some tests checking if the shorthand assignments were successful?

@gakada
Copy link
Copy Markdown
Contributor Author

gakada commented Aug 26, 2018

Seems like travis is happy, though locally I have

Pass: 464/578
Fail: 114/578

because of #186

Error: LUA ERROR: error loading module 'lualib_bundle' from file './lualib_bundle.lua':./lualib_bundle.lua:436: <eof> expected near 'function'

@lolleko
Copy link
Copy Markdown
Member

lolleko commented Aug 26, 2018

Please just test shorthand object assignment. Make sure #186 isn't an issue for your test.

Also a unit test would be nicer than a translation test.

@Perryvw
Copy link
Copy Markdown
Member

Perryvw commented Aug 26, 2018

I would still like a test const myfield = 3; const myobject = {myfield}; return myobject.myfield expecting 3. After that I am fine with merging this.

@gakada
Copy link
Copy Markdown
Contributor Author

gakada commented Aug 26, 2018

Oh there is executeLua as well. Where should I add it?

@gakada
Copy link
Copy Markdown
Contributor Author

gakada commented Aug 26, 2018

Added in ObjectLiteralTests as well since it is not exactly an assignment.

@Perryvw
Copy link
Copy Markdown
Member

Perryvw commented Aug 26, 2018

test/unit/objectLiteral.spec.ts is fine.

@Perryvw Perryvw merged commit 8c6f4ef into TypeScriptToLua:master Aug 26, 2018
@gakada gakada deleted the ShorthandPropertyAssignment branch August 28, 2018 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants