tests/cases/conformance/classes/mixinAccessModifiers.ts(38,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Private2'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(42,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Protected'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(46,4): error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Public'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(50,4): error TS2445: Property 'p' is protected and only accessible within class 'Protected & Protected2' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(65,7): error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'.
  Type 'C1' is not assignable to type 'Private'.
    Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(66,7): error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
  Type 'C2' is not assignable to type 'Private'.
    Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(67,7): error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
  Type 'C3' is not assignable to type 'Private'.
    Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
tests/cases/conformance/classes/mixinAccessModifiers.ts(84,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(89,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(97,6): error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
tests/cases/conformance/classes/mixinAccessModifiers.ts(102,6): error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.


==== tests/cases/conformance/classes/mixinAccessModifiers.ts (11 errors) ====
    type Constructable = new (...args: any[]) => object;
    
    class Private {
    	constructor (...args: any[]) {}
    	private p: string;
    }
    
    class Private2 {
    	constructor (...args: any[]) {}
    	private p: string;
    }
    
    class Protected {
    	constructor (...args: any[]) {}
    	protected p: string;
    	protected static s: string;
    }
    
    class Protected2 {
    	constructor (...args: any[]) {}
    	protected p: string;
    	protected static s: string;
    }
    
    class Public {
    	constructor (...args: any[]) {}
    	public p: string;
    	public static s: string;
    }
    
    class Public2 {
    	constructor (...args: any[]) {}
    	public p: string;
    	public static s: string;
    }
    
    function f1(x: Private & Private2) {
    	x.p;  // Error, private constituent makes property inaccessible
    	  ~
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Private2'.
    }
    
    function f2(x: Private & Protected) {
    	x.p;  // Error, private constituent makes property inaccessible
    	  ~
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Protected'.
    }
    
    function f3(x: Private & Public) {
    	x.p;  // Error, private constituent makes property inaccessible
    	  ~
!!! error TS2546: Property 'p' has conflicting declarations and is inaccessible in type 'Private & Public'.
    }
    
    function f4(x: Protected & Protected2) {
    	x.p;  // Error, protected when all constituents are protected
    	  ~
!!! error TS2445: Property 'p' is protected and only accessible within class 'Protected & Protected2' and its subclasses.
    }
    
    function f5(x: Protected & Public) {
    	x.p;  // Ok, public if any constituent is public
    }
    
    function f6(x: Public & Public2) {
    	x.p;  // Ok, public if any constituent is public
    }
    
    declare function Mix<T, U>(c1: T, c2: U): T & U;
    
    // Can't derive from type with inaccessible properties
    
    class C1 extends Mix(Private, Private2) {}
          ~~
!!! error TS2415: Class 'C1' incorrectly extends base class 'Private & Private2'.
!!! error TS2415:   Type 'C1' is not assignable to type 'Private'.
!!! error TS2415:     Property 'p' has conflicting declarations and is inaccessible in type 'C1'.
    class C2 extends Mix(Private, Protected) {}
          ~~
!!! error TS2415: Class 'C2' incorrectly extends base class 'Private & Protected'.
!!! error TS2415:   Type 'C2' is not assignable to type 'Private'.
!!! error TS2415:     Property 'p' has conflicting declarations and is inaccessible in type 'C2'.
    class C3 extends Mix(Private, Public) {}
          ~~
!!! error TS2415: Class 'C3' incorrectly extends base class 'Private & Public'.
!!! error TS2415:   Type 'C3' is not assignable to type 'Private'.
!!! error TS2415:     Property 'p' has conflicting declarations and is inaccessible in type 'C3'.
    
    class C4 extends Mix(Protected, Protected2) {
    	f(c4: C4, c5: C5, c6: C6) {
    		c4.p;
    		c5.p;
    		c6.p;
    	}
    	static g() {
    		C4.s;
    		C5.s;
    		C6.s
    	}
    }
    
    class C5 extends Mix(Protected, Public) {
    	f(c4: C4, c5: C5, c6: C6) {
    		c4.p;  // Error, not in class deriving from Protected2
    		   ~
!!! error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
    		c5.p;
    		c6.p;
    	}
    	static g() {
    		C4.s;  // Error, not in class deriving from Protected2
    		   ~
!!! error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
    		C5.s;
    		C6.s
    	}
    }
    
    class C6 extends Mix(Public, Public2) {
    	f(c4: C4, c5: C5, c6: C6) {
    		c4.p;  // Error, not in class deriving from Protected2
    		   ~
!!! error TS2445: Property 'p' is protected and only accessible within class 'C4' and its subclasses.
    		c5.p;
    		c6.p;
    	}
    	static g() {
    		C4.s;  // Error, not in class deriving from Protected2
    		   ~
!!! error TS2445: Property 's' is protected and only accessible within class 'typeof C4' and its subclasses.
    		C5.s;
    		C6.s
    	}
    }
    