Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Having a variable in a record with the same name as an enum produces an error on ObjC #5

Open
ErikGoldman opened this issue Sep 15, 2014 · 1 comment

Comments

@ErikGoldman
Copy link

MyEnum = enum {
   blah;
   bloop;
}

MyRecord = record {
  myEnum: MyEnum;
}

Opening this in Objective-C throws the error "must use 'enum' to refer to type MyEnum in this scope" in the MyEnumTranslator.mm file. It also upper-cases the variable name myEnum so it becomes MyEnum, making the variable name and enum name conflict.

@cakoose
Copy link
Contributor

cakoose commented Sep 22, 2014

Sort of a tangent: Djinni expects all identifiers in the ".djinni" file to be of the form "foo_bar". Maybe it should warn when they aren't?

@artwyman artwyman added the bug label Apr 13, 2016
phraemer pushed a commit to PSPDFKit-labs/djinni that referenced this issue Mar 1, 2017
* first half of commits pulled in

* Updated with all commits from cx except new files

* Added support-lib files for cx

* it's the little things

* fixing accidental updates

* Typos and missed spots

* Type makes bad things

* removing windows logic since it never creates start.bat but tries to run it

* reverting .bat windows file

* running .bat file in windows

* removing extra namespace

* adding back extra namespace

* uint != int

* settings start based on os

* fixing windows bat

* writing cx in yaml

* Added missing default

* added more missing default cases

* Fixing incorrect int type

* undo build and run script changes, don't use uint

* Writing out cx in yaml

* removed unecessary cxcpp yaml

* removing cxcpp and temporarily removing interface I

* removing interface I for now

* add some cx yaml

* don't use windows newlines

* updating test to run cx

* remove explicitly generating self

* remove cx test suite stuff, not ready yet

* first step in adding cx to test-suite

* remove some temp folders

* added missing +x (dropbox#5)

* added missing +x

* I'm not shopping at target

* adding I to interface

* One more interface updated

* updated generated src after interface changes

* fix optional to be wrapped in IBox (dropbox#7)

* fix optional to be wrapped in IBox

* optional parameters get IBox'ed

* update generated cx

* add boxing to enums

* datetime and timespan are value struct, not reference

* Added test for list of records in cpp generated file

* don't put the I on classes

* only add the I if cx implemented it

* proxy needs the I too

* put default ctor back for cx

* fix primitives according to MSDN docs about what is supported in Windows Runtime (dropbox#11)

* fix cx primitives according to https://msdn.microsoft.com/en-us/library/hh700121.aspx

* update generated src

* add comment about busted int8 stuff

* fix couple more cx primitives

* update generated src

* interfaces spit out constanst for cx now (dropbox#12)

* enable writing consts to cx cpp file

* interfaces spit out constanst for cx now

* don't need cpp consts to produce anything when it's all in the header

* clarifying comment

* remove commented out code

* get rid of unused def

* use CX yaml context to determine if by ref

* cpp files need to include Proxy for interfaces (dropbox#14)

* cpp files need to include Proxy for interfaces

* space

* pamaters start with little case (dropbox#15)

* Adding translate file for cx

* UpperCamel case enums for cpp

* removing duplicate translate methods
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants