Using Toybox.Activity ends unexpected

Hi.

I've started programming, and wanted to use the activity object/class instead of going trough sensors and position.
So started up with a timer object in the AppBase.

using Toybox.Application as A;
using Toybox.WatchUi as W;
using Toybox.Graphics as G;
using Toybox.Timer as T;
using Toybox.Activity as C;

class tInfo {
var accuracy;
var altitude;
var heading;
var position;
var speed;
var cadence;
var heartrate;
var pressure;
var temperature;
}

var iPos = new tInfo();

class MyTeamApp extends A.AppBase {

function onStart() {
gT = new T.Timer();
gT.start( method(:onActivity) , 1000, true);
}

function onActivity() {
var tAct = C.getActivityInfo();
if (iPos.position != null) { iPos.position = tAct.currentLocation.toDegrees(); }
}
}



This code ends up with a unexpected type caused by the line "if (tAct.currentLocation != null) { iPos.position = tAct.currentLocation.toDegrees(); }" I find this a bit odd since the location.info object should contain toDegrees function and using the same function does work on the position.info object.

Any ideas are most welcome.