OneLang test issues
koczkatamas opened this issue · comments
Tamás Koczka commented
- Python:
else
indentation breaks logic - Python:
Tokenizer::offset
is not initalized to0
in__init__
- Python: static method
StringHelper::starts_with_at_index
hasself
argument and no@staticmethod
attribute - Swift:
Tokenizer::init
uses!
for settingoperators
field - Swift:
Tokenizer::tokenize
: fix empty array init (var result = []
->var result = [Token]()
) - Swift: convert substrings to string (
str[x ..< y]
->String(str[x ..< y])
) - Swift: do not force unwrap operators at foreach (
for curr_op in self.operators!
->for curr_op in self.operators
) - Swift: static methods should be prefixed with
class
(func startsWithAtIndex
->class func startsWithAtIndex
) - Swift: nullability fixes... (eg. return
[Token]?
instead of[Token]
and force unwrap every nullable value on access) - Java: infer foreach item type (instead of
Object
) - Java: use
equals
instead of==
for comparison between strings (StringHelper.startsWithAtIndex
) - Ruby: create accessors for static fields
class << self attr_accessor :identifier end
- Ruby: fix infinite loop (comparison issue?)
- C++: add
;
afterbreak
- C++: prefix static methods with
static
(makeStringHelper::startsWithAtIndex
static) - C++: unify reference handling (make everything shared pointer? so
sp<vector<sp<object>>>>
???)- fix vector initialization
- fix return value type
- fix class field type
- Go: replace
OneArray
with concrete type (eg.[]string
or[]Token
) - Go: use
for
instead ofwhile
- Go: fix static methods
- Go: find out how to use array with custom class (eg.
[]*Token
) - JavaScript: initialize variable (
Tokenizer::constructor
:this.offset = 0;
) - JavaScript: use
static
prefix for static methods (StringHelper::startsWithAtIndex
) - Perl: fix array initializer
- Perl: fix infinite loop bug