Broken .apk on COOPER platform when using associated types

(Kay Großblotekamp) #1

When adding the following code to an empty Android project, it gets compiled (w/o errors or warnings) into an .apk that won’t install on a testdevice.

public protocol dataRep{
 associatedtype Octetrep
  var asString: String{get set}
  var asOctets: [Octetrep]{get set}

class concretedataRep:dataRep{
public typealias OctetRep = SByte
private var data: [OctetRep]

	data = [OctetRep]()

public var asString: String{
	get{return "blabla"}

public var asOctets: Array<SByte>{
		return data


The relevant part of the logcat output:
02-23 18:51:04.832 11151-11151/? E/dalvikvm: Out-of-order method_idx: 0x2a1 then 0x2a1
02-23 18:51:04.832 11151-11151/? E/dalvikvm: Trouble with item 90 @ offset 0x1a50c
02-23 18:51:04.832 11151-11151/? E/dalvikvm: Swap of section type 2006 failed
02-23 18:51:04.832 11151-11151/? E/dalvikvm: ERROR: Byte swap + verify failed
02-23 18:51:04.852 11151-11151/? E/dalvikvm: Optimization failed
02-23 18:51:04.852 117-117/? E/installd: dexopt failed on ‘/data/dalvik-cache/’ res = 65280

The problem can be circumvented by getting rid of the associated type and just have a global typealias OctetRep = SByte

Version info:
Microsoft Visual Studio 2015 Shell (Integrated)
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installed Version: IDE Standard

RemObjects Elements
RemObjects Elements (Oxygene, C# and Silver) for .NET, Cocoa and Java.
Copyright 2003-2016 RemObjects Software, LLC. All rights reserved.

RemObjects Elements leverages the LLVM compiler backend:
Copyright © 2003-2016 University of Illinois at Urbana-Champaign. All rights reserved.

RemObjects Everwood
RemObjects Everwood
Copyright RemObjects Software, LLC 2002-2016. All Rights Reserved.

(RemObjects) #2

Thanks, logged as bugs://77296

(RemObjects) #3

bugs://77296 got closed with status fixed.