Puzzlers 3: Last sith

void validatePhantomMenace(FutureOr Function() f) { 
  print(T); 
}
validatePhantomMenace(() {}); 
  
  1. dynamic
  2. null
  3. object
  4. void

void validatePhantomMenace(FutureOr Function() f) { 
  print(T); 
}
validatePhantomMenace(() {}); 
  
  1. dynamic
  2. null
  3. object
  4. void

const Object jedi = 'C3PO';
const fakeJedis = [jedi as Object, 'BB8'];
const droids = {if (list is List< Object >) ...list};
const troopers = {for (var i in set) i};
    
  1. 1
  2. 3
  3. 4
  4. No error

const Object jedi = 'C3PO';
const fakeJedis = [jedi as Object, 'BB8'];
const droids = {if (list is List< Object >) ...list};
const troopers = {for (var i in set) i};
    
  1. 1
  2. 3
  3. 4
  4. No error

const jedis = {};
var siths = {};

print(jedis.runtimeType);
print(siths.runtimeType);
    
  1. InternalLinkedHashSet ImmutableMap
  2. ImmutableMap InternalLinkedHashMap
  3. InternalLinkedHashSet ImmutableMap
  4. InternalLinkedHashSet InternalLinkedHashMap

const jedis = {};
var siths = {};

print(jedis.runtimeType);
print(siths.runtimeType);
  
  1. InternalLinkedHashSet ImmutableMap
  2. ImmutableMap InternalLinkedHashMap
  3. InternalLinkedHashSet ImmutableMap
  4. InternalLinkedHashSet InternalLinkedHashMap

final order66 = {};
print('Jedis are traitors: ${order66.runtimeType}');
  1. InternalLinkedHashSet
  2. ImmutableMap
  3. ImmutableMap
  4. ImmutableList

final order66 = {};
print('Jedis are traitors: ${order66.runtimeType}');
  1. InternalLinkedHashSet
  2. ImmutableMap
  3. ImmutableMap
  4. ImmutableList

class Jedi {
  String get force => 'Anakin';
}

mixin Sith on Jedi {
  get force => 'Dart ${super.force}';
}

class Anakin extends Object with Sith, Jedi {
  void showForce() => print(this.force);
}
Anakin().showForce();      
  1. Anakin
  2. Dart Anakin
  3. Exception
  4. null

class Jedi {
  String get force => 'Anakin';
}

mixin Sith on Jedi {
  get force => 'Dart ${super.force}';
}

class Anakin extends Object with Sith, Jedi {
  void showForce() => print(this.force);
}
Anakin().showForce();      
  1. Anakin
  2. Dart Anakin
  3. Exception
  4. null